Problem with the Where property at report design

  • Thread starter Thread starter Toni
  • Start date Start date
T

Toni

I use a report with this query at the source property:

SELECT Sum(DENSITY), Min(DATE) AS [MIN_DATE], Max(DATE)
FROM [FUEL];

and the following at the where property

DATE > #01/01/04#

I don´t know why Access ask me about date when actually
date is at the where property. If I change the query and I
do this:

SELECT Sum(DENSITY), Min(DATE) AS [MIN_DATE], Max(DATE)
FROM [FUEL] WHERE DATE > #01/01/04#;

then everything is all right.

Does anybody know why Access do that?
 
Toni

If your field name is "Date", Access (and you) will be confused -- this is a
reserved word in Access, naming the Date() function. Try changing the name
of this field to something more meaningful, like StartDate, or
ReservationDate, or FillingDate.
 
I use a report with this query at the source property:

SELECT Sum(DENSITY), Min(DATE) AS [MIN_DATE], Max(DATE)
FROM [FUEL];

and the following at the where property

DATE > #01/01/04#

I don´t know why Access ask me about date when actually
date is at the where property. If I change the query and I
do this:

SELECT Sum(DENSITY), Min(DATE) AS [MIN_DATE], Max(DATE)
FROM [FUEL] WHERE DATE > #01/01/04#;

then everything is all right.

Does anybody know why Access do that?

Date is a reserved word in Access/VBA.
See the appropriate Microsoft KnowledgeBase article:

109312 'Reserved Words in Microsoft Access'
209187 'Acc2000: 'Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
 
Back
Top