Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2004
    Posts
    11

    Question Unanswered: automatically generate report

    I have a research study database and I want a report to generate 2 weeks after the date in which an event took place. That is, today i should get a report with the people that did xxx 2 weeks ago. Let's say i want it at the end of each week. What's the easiest way to go about doing this?

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    WHERE datefield = DateAdd("d", datefield, -14)

    ??
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    you can also use docmd.sendobject to send the report as e-mail to yourself.
    ghozy.

  4. #4
    Join Date
    Jun 2004
    Posts
    11

    dateadd doesn't work

    Not sure i'm doing this right. I did Dateadd("d", -14, Now()) and this doesn't work.

    the function in access says to enter dateadd(interval, number, date). i also tried ("w", -2, now())

    I don't know what docmd.sendobject is or what to do with that??? where do i enter that? Sorry, not too familiar with this stuff. But thanks for the suggestions!

  5. #5
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    I don't know what docmd.sendobject is or what to do with that??? where do i enter that?
    sendobject method is a functuon that lets you send any access object (reports, tables, etc) as an email through internet. you can refer sendobject subject in Access help.
    ghozy.

  6. #6
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    Hi GoyzueJ

    Be sure to use the (=) sign first, like this:

    =DateAdd("d",-14, [name of your date field])

    If your DateField had a name like uh...let's say, ProcessDate this would be how you do it:

    =DateAdd("d",-14,[ProcessDate])

    Have a nice one,
    Bud

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •