Results 1 to 10 of 10
  1. #1
    Join Date
    Jul 2003
    Posts
    4

    Unanswered: Emailing a Form, Preserving Formatting

    Hello,

    I am using using access 97, and to my knowledge the docmd.sendobject method can not send forms using the snapshot format in 97.

    As a result, i am forced to use one of the other formats i.e HTML. The problem with HTML and the other formats is that they do not preserve the nice formatting that i have created on my form.

    They place every field at the top side by side which makes me have to scroll horizontally.

    Is there a way to incorporate some basic formating, like telling it to start a new line, or leave some spacing when it emails using on of the mentioned formats?

    Thanks

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    silly question: why are you trying to e-mail a form?

    izy

  3. #3
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5
    I agree with izy but you may want to create a report and bind that form to the report and then export to snp format

    then email the report.snp

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    strangely
    docmd.outputto acoutputform .....
    actually exists (A2k) but i guess a report would be better: there's more space on a page than on a screen.

    my dox for A95 make no reference to SNP, did it exist in A97 ??

    izy

  5. #5
    Join Date
    Jul 2003
    Posts
    4
    Thanks for your replies folks.

    Access 97 does not seem to support the snapshot argument of the docmd.sendobject function which I have been told would do accomplish my goal.

    Let me further clarify my situation.

    I have created a form with a number of text boxes, labels, list boxes, and two subforms which all change depending on what a user has entered in another form.

    I simply wish to have this instance of information sent via email, formatted exactly as i have designed, using whatever method will get the job done.

    Thanks very much for your ideas.

  6. #6
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    as i said, i dont know if SNP works in A97. try it anyway and see if it breaks:
    Code:
    DoCmd.OutputTo acOutputReport, "nameOfTheReport", "Snapshot Format", "drive:/path/path/filename.SNP"
    or ...acOutputForm


    izy

  7. #7
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    For what it's worth....

    I use the following in a 97 app that I built:

    DoCmd.SendObject acSendReport, StrReport, "Snapshot Format", strSENDLIST, , , strSubject, , False

    There's also a "acSendForm" argument, but it returns an error
    related to the Registry when you try to send a form with snapshot.
    From what little documentation that is available for snp, it appears it
    is only useful for reports in Access.

  8. #8
    Join Date
    Jul 2003
    Posts
    4
    Thanks for your replies guys.

    Redneck, your last method works fine with reports. I just want to know if there is a way to dynamically convert an instance of a filled form into a report.

    For example, after the form is populated, i want to use code to convert the instance into a report, and then send the report using the info you wrote in your last post. Then every time my application is run and a form is populated i want the newly converted report to over write the old one.

    Is this possible?

    Thanks for your time.

  9. #9
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Build your report based on a query. In the query's criteria, under the column that will link the form and report (eg InvoiceNum), put
    [Forms]![Invoice]![InvoiceNum]

    Put an "Email" button on your form, with at least this code

    Me.Dirty = False 'save the record
    Docmd.SendObject acSendreport....

    This should also work in the form's AfterInsert event, so that you wouldn't have to use a button. I don't know that for sure, though, since
    I've never done anything with that event.
    Inspiration Through Fermentation

  10. #10
    Join Date
    Jul 2003
    Posts
    4
    Thanks for your reply,

    I still am not clear about this part:

    "under the column that will link the form and report "

    Do I just choose any field to link them? I don't intend on storing any of this information after, once it's emailed i don't care about the data any more.

    I i am going to create a report for the sole purpose of "piggy packing" the filled out instance of the form, i'm not sure what i should be linking.

    What else do i require in that query?

    Thanks

Posting Permissions

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