Date

JonyBravo

Registered User.
Local time
Today, 15:30
Joined
Jan 17, 2006
Messages
89
Hi there

In my application I've got a table1 with a field data type "Date/Time"(IncStart). On my form I've got a text field(txtdateFrom) formated to short date. The problem is when a run the following query:
Set rst = CurrentDb.OpenRecordset("SELECT * FROM table1;", dbOpenDynaset)
rst.FindFirst "[Exchange1] = '" & CbmExchange & "' And [IncStart] >= ' # txtdateFrom # '"

I gives me a error saying "Data type mismatch in criteria expression". Can anyone tell me please what am I doing wrong?

Thanks
 
Hi there

I've got the solution now, it is as following:
rst.FindFirst "[Exchange1] = '" & CbmExchange & "' And [IncStart] >= #" & txtdateFrom & "# ".

Thanks anyway
 
Last edited:

Users who are viewing this thread

Back
Top Bottom