Results 1 to 4 of 4
  1. #1
    Eddy Sincere is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Location
    Carson City, NV
    Posts
    114

    Print specific report based on form check boxes

    I can't find this answer anywhere. There are three check boxes on my form, 1, 2 and 3.



    And, there are 3 different report templates, A, B and C.

    I want access to determine which report to print based on which check boxes are checked.

    Example 1:
    Check Box 1 = Null
    Check Box 2 = Check
    Check Box 3 = Null
    Choose Report A

    Example 2:
    Check Box 1 = Check
    Check Box 2 = Check
    Check Box 3 = Null
    Choose Report B

    If this is possible, please direct me to the code. Thanks!

  2. #2
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,932
    Code:
    if check1=true then
        printreport
    end if
    if check2=true then
        printreport
    end if
    if check3=true then
        printreport
    end if

  3. #3
    Eddy Sincere is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Location
    Carson City, NV
    Posts
    114
    Thanks! I'll give it a shot and let you know if it works.

  4. #4
    Eddy Sincere is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Location
    Carson City, NV
    Posts
    114
    Worked like a charm. In case someone else reads my post, here's the actual VBA I used. It basically chooses a report based on a combination of two check boxes. Thanks again for the quick response. Please mark this as solved.



    Private Sub cmdPrnt_Click()


    On Error GoTo cmdPrnt_Click_Err


    If DtrySpplmnt = True And VtmnMnrl = True Then


    DoCmd.OpenReport "rpt1ADSC", acViewPreview, "", "", acNormal
    DoCmd.RunCommand acCmdPrint


    cmdPrnt_Click_Exit:
    Exit Sub


    cmdPrnt_Click_Err:
    Resume cmdPrnt_Click_Exit


    End If


    If DtrySpplmnt = True And VtmnMnrl = False Then


    DoCmd.OpenReport "rpt1BDSOC", acViewPreview, "", "", acNormal
    DoCmd.RunCommand acCmdPrint


    End If
    End Sub

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

Similar Threads

  1. Check box based on values of other check boxes?
    By Michael.Reynolds1775 in forum Forms
    Replies: 3
    Last Post: 03-25-2015, 12:58 AM
  2. Replies: 5
    Last Post: 08-21-2013, 03:17 PM
  3. Replies: 3
    Last Post: 03-11-2013, 05:11 PM
  4. Print a specific record report from a form
    By cynthiacorley in forum Reports
    Replies: 27
    Last Post: 02-08-2010, 06:34 AM
  5. Replies: 1
    Last Post: 07-30-2009, 12:54 PM

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
  •  
Other Forums: Microsoft Office Forums