Using external query (mdb) for dynamic date range

  • Thread starter Burnnie Holliday
  • Start date
B

Burnnie Holliday

I'm trying to set up an Excel workbook with a dynamic link to an Access
database containing quality data, involving dates. I want the workbook to
always import data for the last 90 days. When I try to set this up using MS
Query, to try to filter data I've tried several different variations where
time is greater than or equal to:

date()-30
today()-30
now()-30

And every time, it comes back as an error. It seems to be setting the query
so that the entire statement is a date variable, eg "Syntax error in query
expression '((Table1.Time>=#date()-30#))'" where I'm pretty sure that the
query should read "((Table1.Time>=date()-30))", but I can't find a way to
edit the query directly. It insists on using the Query Wizard instead.
 

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