query if date equals ___

M

mark r

A query has a where clause for date

Where (datefield = variablename)


If I type 11/03/2002 at the msgbox prompt, it doesn't work.
Nor does 11/3/2002
 
J

John Vinson

A query has a where clause for date

Where (datefield = variablename)


If I type 11/03/2002 at the msgbox prompt, it doesn't work.
Nor does 11/3/2002

You may need to delimit the date value with #. What's the datatype of
variablename? And what's the context - a SQL query has no way of
seeing the values of VBA variables; please post the code snippet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top