A
Aaron
hi, i have a table , here are the 5 fields:
with example data shown
LNAME FNAME DOB STARTDATE PRIORSERVICE
smith john 11/9/73 12/01/03 12/01/01
king tom 06/07/70 2/05/01
i have a query set up off of this data that calculates
their age and total years of service
the query is set up like this with these 7 fields:
LNAME
FNAME
DOB
STARTDATE
PRIORSERVICE
Age: Fix(DateDiff("yyyy",[DOB],Now())+Int(Format(Now
(),"mmdd")<Format([DOB],"mmdd")))
TotalYrsService: Fix(DateDiff("yyyy",[PriorService],Now())
+Int(Format(Now(),"mmdd")<Format([PriorService],"mmdd")))
***** my problem is...
it works great if the person has a priorservice date
but if they do not... then it doesn't calculate both their
age and totalyrsservice.. it only calculates the age...
for that record
example of what the query would look like if ran.. with
the above information in the table:
LNAME FNAME DOB STARTDATE PRIORSERVICE AGE TOTALYRS
smith john 11/9/73 12/01/03 12/01/01 30 3
king tom 06/07/70 2/05/01 33
Any ideas will be greatly appreciated
(i abbreviated that field name for TOTALYRSSERVICE in that
last example query so it would all appear on one line
above)
Thanks
Aaron
(e-mail address removed)
with example data shown
LNAME FNAME DOB STARTDATE PRIORSERVICE
smith john 11/9/73 12/01/03 12/01/01
king tom 06/07/70 2/05/01
i have a query set up off of this data that calculates
their age and total years of service
the query is set up like this with these 7 fields:
LNAME
FNAME
DOB
STARTDATE
PRIORSERVICE
Age: Fix(DateDiff("yyyy",[DOB],Now())+Int(Format(Now
(),"mmdd")<Format([DOB],"mmdd")))
TotalYrsService: Fix(DateDiff("yyyy",[PriorService],Now())
+Int(Format(Now(),"mmdd")<Format([PriorService],"mmdd")))
***** my problem is...
it works great if the person has a priorservice date
but if they do not... then it doesn't calculate both their
age and totalyrsservice.. it only calculates the age...
for that record
example of what the query would look like if ran.. with
the above information in the table:
LNAME FNAME DOB STARTDATE PRIORSERVICE AGE TOTALYRS
smith john 11/9/73 12/01/03 12/01/01 30 3
king tom 06/07/70 2/05/01 33
Any ideas will be greatly appreciated
(i abbreviated that field name for TOTALYRSSERVICE in that
last example query so it would all appear on one line
above)
Thanks
Aaron
(e-mail address removed)