Results 1 to 9 of 9

Printing form with subforms

  1. #1
    hertfordkc is offline 18 year novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    468

    Printing form with subforms

    My main form contains several subforms, of which several will always contain data, and several other subforms may or may not contain data. This information displays properly and I could print it with an earlier version of Access. With Access 2007, only the main form includes data in the printout. The subforms show their container boxes, but no data.
    Help please.

  2. #2
    June7's Avatar
    June7 is online now Moderator
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    28,679
    You are printing forms? Forms are not intended to print. Reports are the best object for printing.

    I haven't tried printing form/subform so don't have experience to offer solution.
    To provide db: Make copy, remove confidential data, run compact & repair, zip if large - 2mb allowed, attach to post. Attachment Manager is below the Advanced post editor window.
    If suggestion in this post resolves your issue, please use the Thread Tools and mark the thread as Solved!

    Debug!Debug!Debug! http://www.cpearson.com/excel/debug.htm

  3. #3
    hertfordkc is offline 18 year novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    468
    The database has a number of reports. However, the principal input form concisely displays all of the information associated with an individual record, and is therefore printed when e.g. searching for courthouse records. A "Print" button on the form triggers
    Docmd.Printout acSelection
    which used to do the job. Now the main form prints with data, but the data in the subforms does not print.
    Thanks for any suggestions.

  4. #4
    June7's Avatar
    June7 is online now Moderator
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    28,679
    Try without the acSelection parameter. I think the default is acPrintAll. Maybe that will include the subform.

    Wait, is this form filtered to a single record? On second thought, the acSelection parameter might be needed to restrict the print to only the single displayed record. Is the subform set for Continuous view?
    To provide db: Make copy, remove confidential data, run compact & repair, zip if large - 2mb allowed, attach to post. Attachment Manager is below the Advanced post editor window.
    If suggestion in this post resolves your issue, please use the Thread Tools and mark the thread as Solved!

    Debug!Debug!Debug! http://www.cpearson.com/excel/debug.htm

  5. #5
    hertfordkc is offline 18 year novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    468

    Didn't work.

    Quote Originally Posted by June7 View Post
    Try without the acSelection parameter. I think the default is acPrintAll. Maybe that will include the subform.

    Wait, is this form filtered to a single record? On second thought, the acSelection parameter might be needed to restrict the print to only the single displayed record. Is the subform set for Continuous view?
    1) Removing the acSelection parameter results in multiple records being printed (incorrectly), instead of just the one form of interest.
    2) Some of the subforms are set to single record, some are set to continuous view. None of the subforms print the data that is displayed.

    Since this happened after upgrading to Access 2007, I'm going to review Access options to see any settings might affect the printout.

    I appreciate your suggestions.

  6. #6
    June7's Avatar
    June7 is online now Moderator
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    28,679
    I just tested printing a form/subform with Access2007. Tested with the print dialog and VBA. Tested with subform in both Single and Datasheet views. All worked. Cannot replicate your issue. Do you want to provide project for analysis?
    To provide db: Make copy, remove confidential data, run compact & repair, zip if large - 2mb allowed, attach to post. Attachment Manager is below the Advanced post editor window.
    If suggestion in this post resolves your issue, please use the Thread Tools and mark the thread as Solved!

    Debug!Debug!Debug! http://www.cpearson.com/excel/debug.htm

  7. #7
    hertfordkc is offline 18 year novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    468
    The database is loaded with personal info for 600+ people.
    Could you please load your test for me?
    Thanks.

  8. #8
    June7's Avatar
    June7 is online now Moderator
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    28,679
    Okay, hope this helps. I will remove after you reply or in a few days. You could copy your project and remove confidential data.

    Try printing to different printer, from another computer, create a form/subform from scratch in same project, in a new project - what happens?

    EDIT: Purpose served, file removed.
    To provide db: Make copy, remove confidential data, run compact & repair, zip if large - 2mb allowed, attach to post. Attachment Manager is below the Advanced post editor window.
    If suggestion in this post resolves your issue, please use the Thread Tools and mark the thread as Solved!

    Debug!Debug!Debug! http://www.cpearson.com/excel/debug.htm

  9. #9
    hertfordkc is offline 18 year novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    468
    Thanks for you help.
    When I upgraded to Access 2007, I made changes to the subforms...and mindlessly set "Data Entry" to "Yes". I don't understand why the display still worked as it had in the past, but wouldn't print. However, when I examined your example and compared the settings, your example wouldn't display as I expect when I changed the "Data Entry" property.
    When I set the "Data Entry" property to "No" in the subforms, all of the data printed. I haven't seen any adverse effects of changing to "No" yet.
    Thanks again.

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

Similar Threads

  1. Replies: 4
    Last Post: 06-22-2011, 09:53 AM
  2. Form Stops Updating Subforms
    By caddcop in forum Forms
    Replies: 1
    Last Post: 04-06-2011, 07:37 AM
  3. Form and 3 subforms
    By Mitka in forum Forms
    Replies: 2
    Last Post: 01-15-2011, 12:43 PM
  4. Replies: 2
    Last Post: 03-14-2010, 07:21 AM
  5. Replies: 0
    Last Post: 12-16-2008, 05:49 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
  •  
Tech Forums: Microsoft Office Forums