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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date between problem docmd.runsql

Status
Not open for further replies.

sparkbyte

Technical User
Sep 20, 2002
879
US
Can't seem to get this running.

DoCmd.RunSQL "INSERT INTO tblTrackingParse (Tracking_ID, BoxNumber, FileNumber, TrackingDate) SELECT key AS Tracking_ID, BoxNumber, FileNumber, TrackingDate FROM TrackingTable WHERE TrackingDate BETWEEN #" & Format(CDate("04/01/2010"), "mm/dd/yyyy")& "# AND #" & Format(CDate("04/16/2010") & "#);"

It works without the where clause for the date.

The final version will pass in string variables.



Thanks

John Fuhrman
 
Oops, forgot to add the error.

Expected: list seperator or )

I think I have just been looking at it too long to see the problem and need an extra set of eyes.

Thanks

John Fuhrman
 
Figures...

refresh access and noticed the final paran is inside the last set of double quotes.

& "#")

Fixed. Sorry folks.

Thanks

John Fuhrman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top