Date Add

G

Guest

Hey all,

Im trying to do somthing that I am guessing is quite simple.

Im working on a Db that tracks a fleet of rental skiis. Every 2 years these
skis must be tested.
I have a table that tracks all the information about a given pair of skis,
including the date they were last tested. What I am trying to do is have a
feild within that table autocomplete using the [test date] feild, plus 2
years. This new feild would then become the date when the next test was
required.

The Table is called [Ski Info]
The first date feild is [Test date]
the feild I would like to have calculated is [Next test]

Any ideas?
 
G

Guest

In the AfterUpdate() event of your [Test Date] field:

Me![Next Test] = DateAdd("yyyy", 2, Me![Test Date])

You should make sure the user entered a valid date first.

If I may make a suggestion, you should try to avoid having spaces in field
or control names.

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top