Using query to formulate a date field??

  • Thread starter Thread starter Jenn.H
  • Start date Start date
J

Jenn.H

Guest
OK .. bear with me. I am a self-taught Access user (sometimes clueless!) I have a table with member info. Children's birthdate is a field. Children are only eligible for the program until their 3rd birthday. Isn't there a way for the table/query function to figure out 3 years from the birthdate and put the data into a field?

The database already contains all the children birthdates ... can I enter a function that shows i.e., John's birthdate is 7/15/02 ... 7/15/05 is the date he becomes ineligible. If that date is in another column, I can sort all dates out and only view the eligible members.

I know this is probably SIMPLISTIC -- I am having a very hard time. THANX
 
DateDiff() function

I KNOW it involves the DateDiff() function... do my dates have to be formatted differently? What's the formula?
 
Try:-
Expires:DateAdd("yyyy", 3, [dob])

Peter
 
Jenn.H said:
OK .. bear with me. I am a self-taught Access user (sometimes clueless!) I have a table with member info. Children's birthdate is a field. Children are only eligible for the program until their 3rd birthday. Isn't there a way for the table/query function to figure out 3 years from the birthdate and put the data into a field?

The database already contains all the children birthdates ... can I enter a function that shows i.e., John's birthdate is 7/15/02 ... 7/15/05 is the date he becomes ineligible. If that date is in another column, I can sort all dates out and only view the eligible members.

I know this is probably SIMPLISTIC -- I am having a very hard time. THANX

I would approach it differently. I would create a query and in the DOB column put the following criteria:

>DateAdd("yyyy",-3,Date())

This query will ONLY show eligible kids (those who haven't reached their 3rd birthday as of today).
 

Users who are viewing this thread

Back
Top Bottom