Results 1 to 7 of 7
  1. #1
    jonrod is offline Novice
    Windows Vista Access 2007
    Join Date
    Nov 2014
    Posts
    3

    Using a form, how to PDF a single record using command button

    Novice here! I have limited experience in using MS Access.



    Background: I have inserted a PDF command button into the form. I am trying to create a PDF for a single form/record; however; MS Acess PDF's all of the forms/records.

    I need to do the following:

    1. Create a command button that produces a single PDF for a single form/record.

    Any assistance would be greatly appreciated.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I would output a report rather than a form; you have a lot more control over the look and feel. Easiest for you is probably to use this to open a report filtered in preview mode:

    BaldyWeb wherecondition

    then use OutputTo to create the PDF, then close the report.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    jonrod is offline Novice
    Windows Vista Access 2007
    Join Date
    Nov 2014
    Posts
    3
    Thank for your response Paul.

    I'm sorry, I need to clarify. Is this being done in VBA? I am not familiar with that tool. Or is this a an embedded macro?

    Again, thank you.

    Also, I'm stuck using the form method (for now). I am on a deadline and redesigning the look of the form in report view would be more time consuming, I believe.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Either way, have to filter the dataset. Apply filter to the form so only the one record is included.

    I agree with Paul, simplest is to open filtered report - report in Print Preview, not Report View. The example code is VBA although there is macro equivalent. It can be in the button Click event.

    Building simple report shouldn't take long. Can even copy/paste controls from the form.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I'll get out of the way.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    jonrod is offline Novice
    Windows Vista Access 2007
    Join Date
    Nov 2014
    Posts
    3
    I tried both but I am not having much luck.

    I know that I'm doing something wrong. Any insight? Lost one right here.

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What happens - error message, wrong results, nothing?

    Post the code you attempted or provide the db for analysis. Follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 06-27-2014, 08:02 AM
  2. Replies: 5
    Last Post: 05-10-2014, 12:25 PM
  3. Replies: 3
    Last Post: 11-19-2013, 11:30 AM
  4. Replies: 1
    Last Post: 06-21-2013, 10:41 AM
  5. Replies: 2
    Last Post: 05-11-2012, 11:52 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums