Date/day calculation

racdata

Registered User.
Local time
Today, 07:43
Joined
Oct 30, 2002
Messages
74
Hi
I have the following problem
How do I add days to a date and then display that date?

Table with field names
ServiceDate
Days
NextDate

a) Service Date –
User enter the date the machine was serviced - 19-Aug-2004

b) Date –
User enters the days for the next service - 21 (days)

c) NextDate –
Access calculate the next date and display dd/mmm/yyyy – 9-Sep-2004
 
You would want to use the DateAdd function, NextDate would be equal to...

DateAdd("d", [Days], [ServiceDate])

The Access Help files have a good explanation of the date functions for more info.
 
Problem not solved

I still having problems

see attached db
 

Attachments

Okay, you had 2 problems with the text box. First, when using an expression as the control source for a text box you need to start it with an equal sign. Second, you were trying to add a field called [Date] to [ServiceDate], it should be [Days]. So your control source should be:

=DateAdd("d", [Days], [ServiceDate])
 

Users who are viewing this thread

Back
Top Bottom