Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

date between problem docmd.runsql

date between problem docmd.runsql

date between problem docmd.runsql

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.



John Fuhrman

RE: date between problem docmd.runsql

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.


John Fuhrman

RE: date between problem docmd.runsql


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

& "#")

Fixed.  Sorry folks.


John Fuhrman

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close