L
lhtan123
I have a form with two combo boxes and one textbox which allows user to enter
a date. If this criteria is used to filter records from a query by an sql
string, it runs into error.
I guess it's becos' Date is a string value while the table design has it in
a Date/Time format.
I've tried to look through some examples online but couldn't find a suitable
one to solve my problem. My SQL statement is something like below:
If Not IsNull(Me.txtDate) Then
strWhere = strWhere & "([Date] = " & CDate(Me.txtDate) & ") AND "
End If
a date. If this criteria is used to filter records from a query by an sql
string, it runs into error.
I guess it's becos' Date is a string value while the table design has it in
a Date/Time format.
I've tried to look through some examples online but couldn't find a suitable
one to solve my problem. My SQL statement is something like below:
If Not IsNull(Me.txtDate) Then
strWhere = strWhere & "([Date] = " & CDate(Me.txtDate) & ") AND "
End If