Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DateAdd Question

Status
Not open for further replies.

kpetree10

IS-IT--Management
Jun 15, 2007
57
US
I've got a database that keeps track of gages and their calibration infomation. One table keeps the information of the gage and another keeps the information about it's calibration (i.e. Date, test points, etc). What I'd like to happen is when a new calibration is entered it will take the date it is entered add the number of days specified in a 'calibration frequency' field and place the new date in the 'calibration due' field in the gage table. Is this possible and if so how can I do it?

Thanks for your help!
 
You generally don't want to store values that can be calculated. However, you should be using a form for data entry. You could add code to the After Update event of the entered date control to update the calibration due field.

You haven't provided any table or field or control or form or other names so no one can be much more specific.

Duane
Hook'D on Access
MS Access MVP
 
Here is all the table/form/field information...

Gage Table
Gage ID: One-to-many relationship between Gages and Calibration tables
Calibration Frequency: Number of days until next calibration
Calibration Due Date: Date of next calibration

Calibration table
Gage ID
Calibration Date
Test points

I have a form on the Gages table that contains all the gage table fields. Also on the form is the calibration table so they can enter the calibrations. I looked up the AfterUpdate command but because of the way the calibrations are done I can't have them on a form, just as a table on a form.

Here's a screenshot of the form...
 
If you can't use a form/subform for editing your calibrations then you may be out of luck regarding making this automatic.

Why can't you use a continuous or datasheet subform?

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top