By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,044 Members | 1,287 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,044 IT Pros & Developers. It's quick & easy.

Calculating 55th Bday from DOB over 1500records, exporting to new field

P: 4
Hey guys,

New to the forums but ive hit a snag whilst updating a Access Database at work.

Currently trying to repair and maintain a database that has been built by 6 people all with even worse knowledge of access then me and its becoming a pain at least.

My boss has just said that she wants a new field that displays the date of the patients 55th Birthday.

Problem is there are 1500+ records on this database and ive had a play around but couldnt find out how to do what i wanted to do, so i thought id come to the experts.

As i said i have 1500 patients on this database and i need to calculate their 55th birthday from their DOB

So i need to somehow:

Pull info from the fields in the DOB column
Add 55 to the year section in a dd/mm/yyyy format
and output it to the 55 Birthday column.

I want to be able to do this simultaneously across the 1500 patients, and then once thats done i want it to be on the database so when i enter a new patients DOB it automatically calculates their 55th birthday.

Hope this is clear enough, any help would be greatful. Im working on limited time due to incompetent manager expectations and i dont really want to spend the time going through 1500 records and calculating the 55th birthday manually.

Thanks in advance guys

- Nixeh
Aug 15 '06 #1
Share this Question
Share on Google+
1 Reply


100+
P: 179
The day and month doesn't change from their DOB. Just add 55 to the year. You will have to add another field to your table to store the date (call it "55thBirthday". The best way to do this then is to create an UPDATE query, and have the calulated control in the query. Then when you run the query, it will update the table with the new dates. Drag down the 55thBirthday field into the query, and in the Update field, include the following (assuming "Birthdate" is the name of the field for the person's DOB):

DateAdd("yyyy",55,[BirthDate])

As well, you can create another calculated control (unbound) to display the person's current age, using the "DateDiff" function. Since this always displays the person's current age (as in today), this value is not stored in any table.

comteck
Aug 16 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.