Results 1 to 10 of 10
  1. #1
    Gadgets is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Oct 2015
    Posts
    13

    When printing a report it duplicates

    I have a database that I am creating for a client, when I click on print and it brings up the report, the report is duplicated depending on the length. The report contains subforms that can have unlimited records. I hope this makes sense to you.

    Thanks.


    Chad.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    The subreport in Detail section? The subreport would print with each record of the main report.
    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.

  3. #3
    Gadgets is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Oct 2015
    Posts
    13
    When I click on the button that I created "Print Record" is replicates the same report in there up to 42 pages not 4 pages like it should be.

    Maybe I did the event wrong, I am not sure.

    The envent looks like this.

    Private Sub cmdPrint_Click()
    Dim strWhere As String
    If Me.Dirty Then 'Save any edits.
    Me.Dirty = False
    End If
    If Me.NewRecord Then 'Check there is a record to print
    MsgBox "Select a record to print"
    Else
    strWhere = "[ID] = " & Me.[ID]
    DoCmd.OpenReport "Report1", acViewPreview, , strWhere
    End If
    End Sub

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Code looks fine. Without knowing more about db structure and report design, can't advise further.

    If you want to provide db for analysis, follow instructions at bottom of my post.

    Also, learn debugging. Refer to link at bottom of my post for debugging guidelines.
    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
    Gadgets is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Oct 2015
    Posts
    13

    Zipped Test

    Here is a copy of the DB.

    Thanks for checking it out.
    Attached Files Attached Files

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Don't include Equipment table in the main report RecordSource.

    Why do you have Print Record and Print Report buttons?

    In Relationships - Employee table should not be joined to Invoice table.

    The fields named LaborID, EquipmentID, MaterialsID should be named something like Labor_InvoiceID_FK, Equip_InvoiceID_FK, Mat_InvoiceID_FK.

    Advise no spaces or special characters/punctuation (underscore is exception) in naming convention.
    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.

  7. #7
    Gadgets is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Oct 2015
    Posts
    13
    I removed the relationship with employee table and invoice table.
    The Printer record was just a test, I thought that I took it out.

    I am not sure of what you mean by "Don't include Equipment table in the main report RecordSource."



  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    The main report RecordSource query has two tables joined. Remove Equipment table from the query.
    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.

  9. #9
    Gadgets is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Oct 2015
    Posts
    13
    What is the best way to build the report for this? Would you pull the subform into the report? or ?

  10. #10
    Gadgets is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Oct 2015
    Posts
    13
    The main report? Is that my "Report1" I guess I am not sure what you are saying.

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

Similar Threads

  1. Hide Duplicates in a report
    By WAVP375 in forum Access
    Replies: 7
    Last Post: 08-06-2015, 09:50 AM
  2. Report printing extra pages of the same report.
    By khughes46 in forum Reports
    Replies: 5
    Last Post: 06-19-2014, 07:39 AM
  3. Hidden Duplicates Still Printing
    By ColbyDog in forum Reports
    Replies: 1
    Last Post: 01-21-2013, 04:38 PM
  4. Eliminating Duplicates in a Report
    By RedWolf3x in forum Reports
    Replies: 5
    Last Post: 10-21-2011, 10:42 AM
  5. Removing duplicates & printing uniques
    By sp3cialed in forum Access
    Replies: 1
    Last Post: 08-06-2011, 12:31 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