Date problem

racdata

Registered User.
Local time
Tomorrow, 01:33
Joined
Oct 30, 2002
Messages
74
I have the following: We do inspections every 6 months on certain types of assets and the readings are captured on a form. I have a field where the date of inspection [InspDate] is entered. I also have a field where I enter the next inspection [NxtDate].
I can get the next inspection date on the form but I cannot get this date stored in the table. =([InspDate]+182.63)
I need Access to enter this field and also store this next Inspection date in the table. I need this date to print a report on all the next inspection dates.
I really don’t know how to do this.
 
It is generally considered bad practice to store calculated fields. You can use the DateAdd() function to calculate the Next Inspection date any time you need to display it on a Form or Report.
 
what I have done for my forms is when a person enters the database to update the record, I have the default value set to: =Now()+180, this will automatically set the date to 180 days from the time the form was opened. question, does the data get entered the same day its inspected? also be sure to set your control source to the field in the table.
 
I have done that in the past to set the default to =Now()+180. But the problem is that the inspections was done a few days+ ago. So the date must be entered the day the inspection was done. The only solution seems to be that you type in the next inspection date.
 
Re: Date problem

Would an after update Event procedure on the inspection date do the trick?

Eg After update Me.nxtDate = Me.InspDate + 180

Both text boxes fomat , short date

If are not storeing this calculated field as recommened by BBJ this calculation can be used in the control source of the nxtdate , = [inspDate]+180 and as pointed can be used in queries and reports when required.
 
Last edited:
Re: Date problem

Racdata. I am interested in whether or not your question has been resolved?
 

Users who are viewing this thread

Back
Top Bottom