You should not have a table that contains the age. That is poor database
design. Age is not a set value. It changes. You should store the
birthdate in a table and CALCULATE the age as indicates.
You can then use a DLOOKUP to find the corresponding value in your rate
table.
Fix your data structure and then work on your lookup. Use the help files or
serch for previous posts if you need help building the lookup.
--
Rick B
Andrea said:
Thank you for your help, however, what I am trying to to is to get is the
appropriate rate based on the age of the employee, for example, I have 2
tables, one that includes the age of the employee and another that has the
age and the rates, I need to get the rate of an employee based on his/her
age. Thank you for you help
:
The preferred way to calculate age (in a query) is...
Age:
DateDiff("yyyy",[Birthdate],Date())+(Format([Birthdate],"mmdd")>Format(Date(
),"mmdd"))
--
Rick B
I am trying to create an expression that will find the age of an employee
from one table into another table, and assigned the rate based on
the
age