Results 1 to 7 of 7
  1. #1
    ashu.doc is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2012
    Posts
    124

    Save individual form as PDF

    Hi everyone


    I would like to save individual form (Single customer record) as PDF. How can I do that?

    Thanks
    Ash

  2. #2
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,931
    look at using the docmd.outputto method in a button click event on your form - something like

    DoCmd.OutputTo acOutputForm, "myForm", acFormatPDF, "C:\" & me.name & ".pdf"

    see this link for more information

    https://msdn.microsoft.com/en-us/lib.../ff192065.aspx

  3. #3
    ashu.doc is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2012
    Posts
    124
    Hi Ajax
    That code save all the forms in the database, what I am trying is to save only one form for one customer whichever I want. So suppose I enter all the details of a person and want to print/save the details in the same format (form) as I entered.
    Thanks

  4. #4
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,931
    what do you mean by 'all the forms in the database' - all those that are open? all of them, open or not? one form but all customers? something else?

  5. #5
    ashu.doc is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2012
    Posts
    124
    I use a common form for each customer to enter data. When I use your code or outputto macro to save form it saves all the forms for all the customer in one PDF file.

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Did you include the name of your Form?
    Code:
    DoCmd.OutputTo acOutputForm, "myForm" , acFormatPDF, "C:\" & me.name & ".pdf"
    Perhaps you are talking about all of the records and not all of the forms.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    You will have to apply a filter to the form so that only the desired record(s) are output. Reports are better instrument for outputting data to PDF or print. Report would also need filter.

    Review http://www.allenbrowne.com/ser-62.html
    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: 7
    Last Post: 08-29-2014, 12:02 PM
  2. Replies: 1
    Last Post: 08-28-2013, 02:27 AM
  3. Replies: 3
    Last Post: 10-08-2012, 08:40 AM
  4. Replies: 3
    Last Post: 01-25-2011, 09:50 AM
  5. Replies: 9
    Last Post: 01-20-2011, 02:22 PM

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