Access Date in Report...PLEASE HELP!!!!!!!!!!

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

Guest

I have a Letter Date of 01/01/2006 that is input on the FLY for each letter
when I print it.

I want to put a paragraph in with a ResponseDate file that displays a date
that is always 30 days later than the Letter Date.

I went to the Report Format property and coded the following that did not
work.

Dim ResponseDate as date
ResponseDate = dateadd([LetterDate],dd,+30)

Either get error or nothing happens

PLEASE HELP....>!!!
 
Check your Help file: you've got the syntax incorrect. It's supposed to be:

DateAdd(interval, number, date)

In other words,

ResponseDate = DateAdd("d", 30, [LetterDate])

There's no real reason to put this in the Format event, though. Simply set
the text box's control source to

=ResponseDate = DateAdd("d", 30, [LetterDate])

(including the equal sign)
 
-- WORKED GREAT THANKS SO MUCH Just could not get it to work lapse of memory.


Hansford D. Cornett


Douglas J. Steele said:
Check your Help file: you've got the syntax incorrect. It's supposed to be:

DateAdd(interval, number, date)

In other words,

ResponseDate = DateAdd("d", 30, [LetterDate])

There's no real reason to put this in the Format event, though. Simply set
the text box's control source to

=ResponseDate = DateAdd("d", 30, [LetterDate])

(including the equal sign)


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Hansford cornett said:
I have a Letter Date of 01/01/2006 that is input on the FLY for each letter
when I print it.

I want to put a paragraph in with a ResponseDate file that displays a date
that is always 30 days later than the Letter Date.

I went to the Report Format property and coded the following that did not
work.

Dim ResponseDate as date
ResponseDate = dateadd([LetterDate],dd,+30)

Either get error or nothing happens

PLEASE HELP....>!!!
 
Back
Top