Report based on 2 check boxes

Reynastus

Registered User.
Local time
Today, 11:02
Joined
Mar 23, 2011
Messages
25
Hi All

I have a menu button that calls a report which works fine however the user wishes more functionality from this report. This is why I have added a second check box.

Lets call the check boxes 1 and 2. I want the report to print records where both 1 and 2 are FALSE.

If check box 2 is True (the new check box) then check box 1 is not applicable and the records should not show up on the before mentioned report.

If Check box 1 is True then the action required has been fulfilled and the record is no longer required on the report.

I thought it would be something simple like such
Code:
Private Sub cmd_Report_Click()
    Dim stDocName As String
        
    stDocName = "rpt_SentToDSU"
        
    DoCmd.OpenReport stDocName, acPreview, , "[fld_YN_SentToDSU] = FALSE" & "[fld_ClinicPT] = FALSE"
End Sub

Where [fld_YN_SentToDSU] = field for Checkbox 1 data and [fld_ClinicPT] = field for checkbox 2 data

I hope this is enough explanation as to strip the db down will be a fairly massive task.

Rey
 
Try

DoCmd.OpenReport stDocName, acPreview, , "[fld_YN_SentToDSU] = FALSE AND [fld_ClinicPT] = FALSE"
 
That worked ... Cheers

Must admit I was pretty stoked that I was fairly close to the right idea but still fairly new to VBA.
 
Happy to help; you were close!
 

Users who are viewing this thread

Back
Top Bottom