cseink
asked on
convert birthdate to age
I have two fields in my access form AgeG and Agel that I need added to the query below. I need to find the age of the person from the dob field then get all records that fall in that age group between ageG and AgeL. What is the best way to handle this?
SELECT tblDemo.clinic_code, tblDemo.chart_number, tblDemo.last_name AS LastName, tblDemo.first_name AS Firstname, tblDemo.address1 AS Address1, tblDemo.address2 AS Address2, tblDemo.city AS City, tblDemo.state AS State, tblDemo.zip AS Zip, tblDemo.phone1 AS Phone1, tblDemo.phone2 AS Phone2, tblDemo.sex, tblDemo.dob
FROM tblDemo LEFT JOIN Qry_ListPatientReceiveService2 ON (tblDemo.chart_number = Qry_ListPatientReceiveService2.chart_number) AND (tblDemo.clinic_code = Qry_ListPatientReceiveService2.clinic_code)
WHERE (((Qry_ListPatientReceiveService2.chart_number) Is Null) AND ((Activeclinic2([tblDemo]![clinic_code]))=True) AND ((Activeperiod2([tblDemo].[start_date],Nz([tblDemo].[end_date],Date())))=True)) AND ((tblDemo.sex)=[Forms]![frmMain2]![txttemp]);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.