adding days to the date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

First, happy holidays all!!

Scenario: I have a command button that prints a report (actually a
notification letter) for a specific customer record. But sometimes that
letter wont get mailed for a day or two.

On this report, I have the date field showing, in long format
(=Format(Date(),"Long Date")).

My question is, is there a way with some code, to add 2 days to the date, so
if I print this letter on the 24th, the date would actually show the 26th?

Thanks all!!
 
Try setting these properties for your text box:
Control Source =Date() + 2
Format Long Date
 
You could use the DateAdd function where you have Date(), but because of the
way Access/VBA handle dates, you can simply add 2.

=Format(Date() + 2,"Long Date")

Dates are stored as a floating point number giving the number of days and
fraction of days since 30 December 1899. The part to the left of the decimal
is the number of days and the part to the right of the decimal is the
fraction of a day or time of the day. So, 1.25 would be 6:00 AM, 31 Dec
1899. Since the whole number part is the days part, you can get by with just
adding and subtracting if you are adding and subtracting whole days.
 
Back
Top