Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    ChrisCMU is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2009
    Posts
    8

    Create PDF for each record in table/form

    Sorry I am a novice Access user.



    I created a simple form layout. I want to generate a PDF for each row in the sheet and have them named by a certain field (let's call the field "Name"). I need to be able to find the form by name.

    I have limited Access 2003 experience and no 2007 experience (besides creating this form). Can anyone help me (or at least point me to a tutorial on this)? Thanks!

  2. #2
    ChrisCMU is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2009
    Posts
    8
    I guess it doesn't need to be PDF's. If I could just generate a report for each Row that would be key. I have over 500 and I don't want them all on one report.

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    So you want to print a Report (PDF) for each record in your table? Does this link give you any ideas?

  4. #4
    ChrisCMU is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2009
    Posts
    8
    I assume [RunId] is the field name I want to run it on?

    Is there anything else I need to replace in that specific to my database?

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Your assumption is correct and that link shows how to print your report for just one record.

  6. #6
    ChrisCMU is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2009
    Posts
    8
    I can't get it to work. If my field name is:

    Well Name

    What do I do? I replaced the RunID inside the brackets and it says field RunID not found for some reason.
    Dim strDocName As String
    Dim strWhere As String
    strDocName = "rptSomeReport"
    strWhere = "[RunID]=" & me!RunID
    DoCmd.OpenReport strDocName, acPreview, , strWhere

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Name is a reserved word and should not be used. Just tell me what the real names of the fields and controls are and we'll put the code together.

  8. #8
    ChrisCMU is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2009
    Posts
    8
    I changed it to "Well_Name" and it seems to stop flagging that.

    The problem now is it is saying my report does not exist. I can create one and rename it within the code to match, but I want the output to match the form I created. The report creates more of a listing than an actual form. I need the output to display the table boxes I make in the form. I'm not sure I want anything to do with reports at all. Sorry for being a novice.

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Forms are for interaction with the user and Reports are for printing but I believe you can print a form. I'll have to do a little research and load my ac2007.

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Are you trying to make a users manual or something? Why are you trying to print the form?

  11. #11
    ChrisCMU is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2009
    Posts
    8
    We have a large database with field notes for 500+ sites. The form displays these results in tables. We need to be able to export these forms to a PDF (obviously automated). They need to be individual, and in the layout the form is in. If that requires me setting up a report in that format, so be it. I wasn't sure it allowed that kind of manipulation though.

    The output does not need any functionality at all (toggle boxes, text boxes for input, etc). It can be a completely static output as long as the look and feel of it matches those tables. I linked a sample output since it was too big to post (cropping off the company names on the top). All this data is in the database (BTW, the picture is not required in the output if that matters)...

    http://i26.tinypic.com/sljl9c.jpg

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Have you played with the PrintForm method yet?

  13. #13
    ChrisCMU is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2009
    Posts
    8
    nope. don't know anything about that.

  14. #14
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Help should give you some insite into the method.

  15. #15
    ChrisCMU is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2009
    Posts
    8
    I tried that and nothing came up. I searched these forums and this was the only thread it came up under too.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 10-22-2022, 08:27 AM
  2. Replies: 3
    Last Post: 06-01-2009, 01:41 PM
  3. Replies: 0
    Last Post: 01-06-2009, 02:17 PM
  4. create word documet for each record
    By datto in forum Programming
    Replies: 0
    Last Post: 02-11-2007, 06:57 AM
  5. Replies: 0
    Last Post: 06-30-2006, 09:00 AM

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