Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA - Processing field DATE in Sql statement

Status
Not open for further replies.

fcail

Technical User
Mar 25, 2001
31
FR
Hi,
When i run my sql Query, i have no problem, i try to execute in a vba code and it doesn't work :

My code :
SQL = " SELECT Extraction.Date FROM Extraction WHERE (((Extraction.Date) > #6/1/2006 0:0:1#))"
MsgBox SQL
DoCmd.RunSQL SQL

Thanks for your help.

Freddy



 

SQL = "SELECT Extraction.Date FROM Extraction WHERE (((Extraction.Date) > #2006-06-01 00:00:01#))
 
The DoCmd.RunSQL accepts only ACTION queries ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top