Morpheus_UK
Registered User.
- Local time
- Today, 16:39
- Joined
- Dec 31, 2004
- Messages
- 23
Ok, I have a table called MAIN which includes the 2 fields DOB and AGE. So far I can calculate Age field by running this Update Query:
Field: Age
Table:MAIN
Update to: DateDiff("yyyy",[DOB],Date())+Int(Format(Date(),"mmdd")<Format([DOB],"mmdd"))
Is there a way to have this Query run everytime the Database is opened, automatically? Also, how would I then avoid the problem of Msg boxes poping up asking if I want to Update peoples records (concerning Age). I don't want this asked, cos its obvious I want Age up-to-date, I don't want to be asked. So how would this be done?
If there is another method for keeping an Age field in a table up-to-date based on the DOB field, please let us know. Any help will be well recieved.
Field: Age
Table:MAIN
Update to: DateDiff("yyyy",[DOB],Date())+Int(Format(Date(),"mmdd")<Format([DOB],"mmdd"))
Is there a way to have this Query run everytime the Database is opened, automatically? Also, how would I then avoid the problem of Msg boxes poping up asking if I want to Update peoples records (concerning Age). I don't want this asked, cos its obvious I want Age up-to-date, I don't want to be asked. So how would this be done?
If there is another method for keeping an Age field in a table up-to-date based on the DOB field, please let us know. Any help will be well recieved.
