report on date of birth

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have data with customers name etc and also date of birth, i need to
generate a report filtering the customers from between 18-24 yrs old, please
help as lost
 
Create a query that finds records where date-of-birth is between 18 and 24
years. You can use the DateAdd() function (see Access HELP for specific
syntax) to come up with the math. You will be comparing against the value
of Date(), which returns today's date.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/
 
hi jeff

thanks for pointing me in the right direction but as new to all this it is
going to be fun to make the syntax as never done before but thanks for your
help
 
i have data with customers name etc and also date of birth, i need to
generate a report filtering the customers from between 18-24 yrs old, please
help as lost

To correctly calculate the age of your clients as of the date the
report is run:

In a query:
Age: DateDiff("yyyy", [DOB], Date()) - IIF(Format([DOB], "mmdd") >
Format(Date(), "mmdd"), 1, 0)

Then, as criteria on this Age field:
Between 18 and 24

Use this query as the report's record source.
 
Field: DOB
Criteria: Between DateSerial(Year(Date())-28, Month(Date()), Day(Date())) AND
DateSerial(Year(Date())-24, Month(Date()), Day(Date()))

That should get everyone the is between 24 and 28 years of age on today's date.
 
Back
Top