Results 1 to 3 of 3
  1. #1
    CQCDave is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2014
    Posts
    47

    Print out single record onto a report

    I have this code attached to my Print Report command button;

    Dim strDocName As String
    Dim strWhere As String
    strDocName = "NCR Internal"
    strWhere = "[NCRNumber]=" & Me!NCRNumber
    DoCmd.OpenReport strDocName, acPreview, , strWhere

    When I print it, using a full copy of Access, it prints out only the current report. When other users, using Run time access, it prints out all records in the table.
    Does anyone see/know why this would do that?

    I'm using MS Access 2010.

    Thanks for your help!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    8,279
    Wow , that's odd. Test this,
    right before the line: DoCmd.OpenReport
    put: msgbox Me!NCRNumber
    then run it in the runtime and see if it pops with the correct ID?

    Its POSSIBLE that if no ID is present, it may print all.

  3. #3
    CQCDave is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2014
    Posts
    47
    Well, that worked, displays the record number in a message box and once that is clicked away it goes to the print preview. Thanks for your help. That was weird!

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

Similar Threads

  1. Print out single record onto a report
    By CQCDave in forum Access
    Replies: 14
    Last Post: 01-08-2015, 12:55 PM
  2. Replies: 4
    Last Post: 06-27-2014, 08:02 AM
  3. Print Single Record
    By stattech in forum Reports
    Replies: 5
    Last Post: 10-05-2010, 03:38 AM
  4. How to print a single Record's report?
    By yes sir in forum Access
    Replies: 7
    Last Post: 09-20-2010, 07:31 AM
  5. Print Single Report
    By emkwan in forum Access
    Replies: 1
    Last Post: 01-29-2010, 11:19 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 - Senior Forums