Date question (1 Viewer)

racdata

Registered User.
Local time
Today, 19:23
Joined
Oct 30, 2002
Messages
74
Hi everybody.

Compliments for 2013 to all of you.

I struggle a long time to solve this on my own but I can't.

Table Fields: Asset_No, DateInsp, NextInsp. (This is only 3 field names in the table)

On the form I enter the Asset No that was inspected. Enter the inspection date. This is always a few days ago.
I want Access to enter the next inspection date based on the scheduled period against the type of asset, and store the date in the table.

Example: Inspect on 01-05-2011 (dd-mm-yyyy format) the next inspection date must then be 01-11-2011. The schedule period is 6 months 182 days.
 

pr2-eugin

Super Moderator
Local time
Today, 17:23
Joined
Nov 30, 2011
Messages
8,494
racdata, are you sure you want to store this information? Because this seems to be a calculated value and is not considered a good practice to do it, you sure can display in an Unbound Text box every time the record is opened.. You can also use a Query to display all records whose inspection date will be in the next few days or something..

So I find any hard reasons for this data to be stored in the table, so think again and post back what you would want to do..
 

racdata

Registered User.
Local time
Today, 19:23
Joined
Oct 30, 2002
Messages
74
Thank you for guiding me the right way. I agree it is useless to store these dates. I will do it in a query. I do have it in a Unbound Text box for every record.
 

RainLover

VIP From a land downunder
Local time
Tomorrow, 02:23
Joined
Jan 5, 2009
Messages
5,041
I can't give the full syntax because I don't know your design and how you pick up the period you need to add.

However you do need to use the Function "DateAdd"

Best place to look is in the help section of Access.
 

Users who are viewing this thread

Top Bottom