I am exporting a table into excel and i have all of the code i need with one exception. I need to select records that were entered within the last 2 weeks. The table has a field called orderdate with the date entered for each record. This is the line i need to change.
Set rs = db.OpenRecordset("cambeorders", dbOpenSnapshot)
i was thinking something like this
Set rs = db.OpenRecordset("Select * FROM cambeorders WHERE orderdate < #" & Date & "# AND orderdate > #" & DateAdd(ww, -2, date) & "#", dbOpenSnapshot)
Durible Outer Casing to Prevent Fall-Apart
Set rs = db.OpenRecordset("cambeorders", dbOpenSnapshot)
i was thinking something like this
Set rs = db.OpenRecordset("Select * FROM cambeorders WHERE orderdate < #" & Date & "# AND orderdate > #" & DateAdd(ww, -2, date) & "#", dbOpenSnapshot)
Durible Outer Casing to Prevent Fall-Apart