Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2009
    Location
    Virginia
    Posts
    9

    Question Unanswered: Outputting a form's contents to pdf

    HELP!!

    I'm trying to output the current contents of my form to a pdf and also to an email. I recorded a macro with the two steps and it seemed to work... until I added a second record. Now it prints the form with record 1, then another copy of the form with record 2. How can I just get Access to output only the current contents of the form from a button on the bottom of my form?

    Thanks!!

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    Welcome to the forums

    Quote Originally Posted by Bill the Cat
    I'm trying to output the current contents of my form to a pdf and also to an email. I recorded a macro with the two steps and it seemed to work... until I added a second record. Now it prints the form with record 1, then another copy of the form with record 2. How can I just get Access to output only the current contents of the form from a button on the bottom of my form?
    I'm not sure how you set up your macro (uugghhh, macros, I try to avoid them at all costs), but I would use Stephan Leban's solution. Without knowing more about how you set up your form/button, I don't know how much more I can help you.
    Me.Geek = True

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Don't print forms, make a report to do it instead. That report would limit its data to only the record shown in the form.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  4. #4
    Join Date
    Oct 2009
    Location
    Virginia
    Posts
    9
    Quote Originally Posted by nckdryr
    Welcome to the forums



    I'm not sure how you set up your macro (uugghhh, macros, I try to avoid them at all costs), but I would use Stephan Leban's solution. Without knowing more about how you set up your form/button, I don't know how much more I can help you.
    Eh, unfortunately, I can't load anything on my work PC, especially since I work for the group that enforces that policy

    Here's how the macro is set up:

    SendObject | Form, Closing Incident Form, PDF Format (*.pdf), , , , , , Yes,


    How would I convert only the current record to a report so I could email it?

  5. #5
    Join Date
    Oct 2009
    Location
    Virginia
    Posts
    9
    I'm researching this, and it looks like I need an event procedure for the button instead of a macro. Just for your info, the form is called "Closing Incident Form" and the field I need to filter on is "Incident Number".

  6. #6
    Join Date
    Oct 2009
    Location
    Virginia
    Posts
    9
    Sorry... double post.

  7. #7
    Join Date
    Oct 2009
    Location
    Virginia
    Posts
    9
    OK, I figured out a way around it. I created a report by taking the form and doing a "save as" and saving it as a report. I then created a query with the identical fields from my form and put a prompt for incident number in the query so that it asks for the record number. I then changed the data source of the created report to the new query. I edited the macro that the button runs to send the report as a pdf. Saved and clicked. It asks for the incident number, then opens up the new email with the single incident as an attachment.

    WOOHOO!!

Posting Permissions

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