Criteria in a query

Pos

Registered User.
Local time
Today, 16:30
Joined
Jan 13, 2002
Messages
10
Hi all,

I have enter an expression in the field of an expression

Visual Next Service Date: DateAdd("m",[frequency],[LastServiceDate])

When i enter a date calculation..<DateAdd("m",0,Date()).. in the criteria i get an error message.. works fine in access 2002 but i need it in 97


any top tip as to if it can be done in 97 and if so how

Cheers Pos,
 
Tried your example in 97 and it ran without problem. Suspect there's something else going on. As a test, copy/paste the following into a new query in Northwind. You should be able to run it, and modify the number of months.

SELECT Orders.OrderID, Orders.OrderDate
FROM Orders
WHERE (((Orders.OrderDate)<DateAdd("m",-72,Date())));
 
Hi,

Just of a matter of interest if you have a gap in any part of the field expression would this cause the criteria expression not to work. This is the full expression in the field of the query,

ie Visual Next Service Date: DateAdd("m",[Formal visual frequency],[Formal Visual LastServiceDate])

and in the criteria in the query

ie <DateAdd("m",0,Date())

Cheers Pos,
 

Users who are viewing this thread

Back
Top Bottom