Hi all-
I have an MS Access database with a table that contains employee information, including a field for date of birth (dteDOB).
I want to run a query from this table and only display employees that have a birthday occuring within the next 60 days.
This does not seem to be working for me...
Query Field 'NextBDay'
NextBDay: IIf(Month(Date())>Month([dteDOB]) Or (Month(Date())=Month([dteDOB]) And Day(Date())>=Day([dteDOB])),"#"&Month([dteDOB])&"/"&Day([dteDOB])&"/"&Year(Date())+1&"#", "#"&Month([dteDOB])&"/"&Day([dteDOB])&"/"&Year(Date())&"#")
Criteria: >Date() AND <=Date()+60
Any insight is appreciated.
-Rod
I have an MS Access database with a table that contains employee information, including a field for date of birth (dteDOB).
I want to run a query from this table and only display employees that have a birthday occuring within the next 60 days.
This does not seem to be working for me...
Query Field 'NextBDay'
NextBDay: IIf(Month(Date())>Month([dteDOB]) Or (Month(Date())=Month([dteDOB]) And Day(Date())>=Day([dteDOB])),"#"&Month([dteDOB])&"/"&Day([dteDOB])&"/"&Year(Date())+1&"#", "#"&Month([dteDOB])&"/"&Day([dteDOB])&"/"&Year(Date())&"#")
Criteria: >Date() AND <=Date()+60
Any insight is appreciated.
-Rod