Hi

Please can someone help me, i am using crystal reports 8 and am rather fimiliar with it. But what i would like to do is, i am using an access database, with one of the fields being "Arrival Date", i have a text box on my form with the current date in it at form load, so now what i want to do is only print out the customer names that match the date in the textbox but i am really struggling, in my very limited sql knowledge i have written the following code, i don't get any errors and the report prints out every name in the database, when it should only print the names that match the current date.

VB Code:
  1. vbcode
Dim adoCon As ADODB.Connection
Set adoCon = New ADODB.Connection
adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\quick-res\DATA\data.mdb;Persist Security Info=False"
Dim isql As String
isql = "SELECT Guests.[Arrival Date] FROM Guests WHERE Guests.[Arrival Date] = txtdate.Text"

With rptMain

.ReportFileName = ("C:\Test2.rpt")
.SQLQuery = lSql
.Destination = crptToWindow



End With

If rptMain.PrintReport <> 0 Then
MsgBox rptMain.LastErrorString
Screen.MousePointer = vbDefault
End If

VB Code:
  1. vbcode

Please can someone assist me.

Many thanks in advance.