Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Access
3rdpartyusrgrp
access
activexcontrol
adp.sqlserver
commandbarsui
conversion
dataaccess.pages
developers.toolkitode
devtoolkits
externaldata
forms
formscoding
gettingstarted
internet
interopoledde
macros
modulescoding
modulesdaovba
modulesdaovba.ado
multiuser
odbcclientsvr
queries
replication
reports
security
setupconfig
tablesdbdesign
  
 
date: Tue, 30 Sep 2008 09:07:16 -0700 (PDT),    group: microsoft.public.access.queries        back       


Help with more than on expiration Date   
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.
date: Tue, 30 Sep 2008 09:07:16 -0700 (PDT)   author:   Alicia

Re: Help with more than on expiration Date   
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
date: Tue, 30 Sep 2008 09:18:45 -0700 (PDT)   author:   Alicia

Re: Help with more than on expiration Date   
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.
-- 
KARL DEWEY
Build a little - Test a little


"Alicia" wrote:

> 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
>
date: Tue, 30 Sep 2008 12:05:03 -0700   author:   KARL DEWEY

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us