Results 1 to 2 of 2
  1. #1
    cap.zadi is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2011
    Location
    KSA
    Posts
    481

    How to Print current Transaction?

    Hey there,



    I have a form where i perform some test and go to print command which is supported by a report for tests.

    right now i have put query which ask 1st which test no want to print so i just put testno and print the page but i am looking to print as i enter the record and go to print so must print the last transaction only?

    how it can be plz?

    zee

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Here is code I use to print the current record using a report based upon a query. I put this code on an on click event for a command button.

    Code:
    Private Sub Command28_Click()
    On Error GoTo Err_Command28_Click
    
        Dim stDocName As String
    
        stDocName = "Submission"
        'DoCmd.OpenReport stDocName, acNormal, , "[ID] = Forms!frmClients!ID"
        DoCmd.OpenReport stDocName, acViewPreview, , "[ID]=Forms!frmClients!ID"
    
    Exit_Command28_Click:
        Exit Sub
    
    Err_Command28_Click:
        MsgBox Err.Description
        Resume Exit_Command28_Click
        
    End Sub
    Make sure to rename the controls to match your names.

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

Similar Threads

  1. Print Report from Current Record
    By hnkford in forum Reports
    Replies: 15
    Last Post: 05-22-2015, 08:08 AM
  2. Replies: 7
    Last Post: 11-14-2011, 05:59 PM
  3. Replies: 5
    Last Post: 10-26-2011, 02:59 PM
  4. Transaction v Lookup table
    By jke in forum Access
    Replies: 2
    Last Post: 06-15-2011, 08:44 PM
  5. SQL Transaction question
    By Mazdaspeed6 in forum Programming
    Replies: 4
    Last Post: 12-16-2010, 12:51 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