Between Satement

teabags

Registered User.
Local time
Yesterday, 18:30
Joined
Jun 29, 2006
Messages
21
I am passing a sql statement through vb and I am getting a criteria mismatch expression.

Between '" & DStart & "' And '" & DFinish & "'

DStart and Finish both correspond to numeric fields in an access database
 
Numeric fields should not be surrounded by single quotes.
 
...date literals need to be surrounded by '#'

i.e. a string representing today's date is
Code:
"08/01/2006" or '08/01/2006'
but a date object representing today's date is
Code:
 #08/01/2006#
 

Users who are viewing this thread

Back
Top Bottom