Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jun 2002
    Location
    San Antonio, Texas, Uganda
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Emailing a report (2000)

    I have a form based upon a query. I want to generate a report based upon the current form and attach that report to an Outlook e-mail.

    In the past I used a macro in Access 97 that :
    1. Saved the current form whose record source was a table
    2. Opened the report in Print Preview Mode
    3. The query that is the record source of the report had criteria in the EventID field to select the current record in the form
    [Forms]![Suspense]![EventID]
    I used the SEND command in the macro.
    It started Outlook and attached the report to the message.

    Can't get it to work in Access 2000 says Macro failed
    under arguments it says:
    rptTransmittal, Print Preview, ,

    I tried putting a SQL where statement in the macro argument to use the current form but that doesn't work either.

    What should I be looking up to give me some examples/help on this?

    Thanks,

    Perry Van

  2. #2
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Goose Creek, South Carolina, USA
    Posts
    108
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: Emailing a report (2000)

    I've had good luck exporting reports to snapview (Access 2k) , then attaching the snp file to email.

  3. #3
    New Lounger
    Join Date
    Jun 2002
    Location
    San Antonio, Texas, Uganda
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Emailing a report (2000)

    Thanks,
    I forgot to mention that one of the fields in the report is an embedded object (Word Doc) from the form. Don't think a snp will work for that.

  4. #4
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Emailing a report (2000)

    Docmd.sendobject can be used to email a report.
    I haven't tried it with an embedded word object, but what it does is convert the report to an rtf file, so imagine it will work.
    You would need to save the record (if there is a chance that the info in the form has been changed), but you don't need to open the report to send it.
    Regards
    John



Posting Permissions

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