Date() help (1 Viewer)

gguy

Registered User.
Local time
Today, 16:38
Joined
Jun 27, 2002
Messages
104
I have a table that is used to remember how often certain weights need to be recalibrated.

The table has a field to show the date_of_last_calibration (LastCalDT) and a field to show calibration_interval (CalIntrvl).
CalIntrvl can be 365, 730 ect.

I can use <date()-365 to list all the ones that have gone past 365 days without recalibration but I want to replace 365 with the CalIntrvl for each record (or weight). Thanks, GGuy
 

gguy

Registered User.
Local time
Today, 16:38
Joined
Jun 27, 2002
Messages
104
In the criteria field for LastCalDt I added

<DateAdd("d",-365,Date())

which works just fine if I would want only weights that are more than 365 days past their last calibration. The problem is that each weight has a different interval of time that it might be required to be recalibrated.

dateadd(interval, number, date)

So, I need to replace number with - "CalIntrvl" from the same record but when I do, I get an data type mismatch error in criteria. Thanks, GGuy
 

gguy

Registered User.
Local time
Today, 16:38
Joined
Jun 27, 2002
Messages
104
The problem was that out of 10,000 records I had a couple with no data entered.
I put nz() around the [CalIntvrl] and all is well.
Thanks for the help. GG
 

Users who are viewing this thread

Top Bottom