Help with more than on expiration Date

  • Thread starter Thread starter Alicia
  • Start date Start date
A

Alicia

SQL:

SELECT Test.[ID], Test.[First Name], Test.[Last Name], Test.[Crane
Certification], Test.[Physical], Test.[Lincense], Test.[Safety Card]
FROM Test
WHERE ((Year([Physical])=Year(Now()) And
Month([Physical])=Month(Now()))) OR ((Year([Crane
Certification])=Year(Now()) And Month([Crane
Certification])=Month(Now())));


The formula above will pull everything from Physical and Crane
Certification for the Current Month but, when I try to do and or
criteria to add Lincense and Safety Card to query the formula will not
work.
 
SELECT Test.[ID], Test.[First Name], Test.[Last Name], Test.[Crane
Certification], Test.[Physical], Test.[Lincense], Test.[Safety Card]
FROM Test
WHERE ((Year([Lincense])=Year(Now()) And
Month([Lincense])=Month(Now()))) OR ((Year([Physical])=Year(Now()) And
Month([Physical])=Month(Now()))) OR ((Year([Crane
Certification])=Year(Now()) And Month([Crane
Certification])=Month(Now()))) OR ((Year([Safety Card])=Year(Now())
And Month([Safety Card])=Month(Now())));


I figured out the answer.

Thanks for you help
 
Your table should be like this and not like a spreadsheet.
Test ---
ID - Autonumber -
First Name - text
Last Name - text
CertDate - DateTime
Type - text - Crane, Physical, License, Safety Card, CPR, First Aid, etc
Expire - DateTime
FROM Test

This way you keep historical records.
 
Back
Top