From: Burnnie Holliday on
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.

--
Burnnie Holliday
Data Wrangler
From: Burnnie Holliday on
Heh... make that the last 30 days. You get the point.
--
Burnnie Holliday
Data Wrangler


"Burnnie Holliday" wrote:

> 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.
>
> --
> Burnnie Holliday
> Data Wrangler
From: Burnnie Holliday on
Nevermind, I've just figured out the answer.
--
Burnnie Holliday
Data Wrangler


"Burnnie Holliday" wrote:

> 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.
>
> --
> Burnnie Holliday
> Data Wrangler