G
Guest
Is it possible to add cases to the following code?
The code currently just shows a report. I am trying to add two check boxes
(box1 and box2) which would display different reports, All Cases, OPEN cases
and CLOSED cases - based on which check box (if any) the user picks.
Example:
Case "ALL"
If Me.box1 false and Me.box2 false Then
DoCmd.OpenReport "r_ALLcases", acViewPreview
Case "OpenCases"
If Me.box1 True and Me.box2 false Then
DoCmd.OpenReport "r_OPENcases", acViewPreview
Case "ClosedCases"
If Me.box1 False and Me.box2 True Then
DoCmd.OpenReport "r_CLOSEDcases", acViewPreview
///////////
Dim stDocName As String
stRecords = "E"
stDocName = "r_EPO_Report"
If IsNull(Me.txtStartDate) Or IsNull(Me.txtEndDate) Then
MsgBox "Please make sure you entered a start and end date."
Exit Sub
Else
DoCmd.OpenReport stDocName, acPreview
End If
The code currently just shows a report. I am trying to add two check boxes
(box1 and box2) which would display different reports, All Cases, OPEN cases
and CLOSED cases - based on which check box (if any) the user picks.
Example:
Case "ALL"
If Me.box1 false and Me.box2 false Then
DoCmd.OpenReport "r_ALLcases", acViewPreview
Case "OpenCases"
If Me.box1 True and Me.box2 false Then
DoCmd.OpenReport "r_OPENcases", acViewPreview
Case "ClosedCases"
If Me.box1 False and Me.box2 True Then
DoCmd.OpenReport "r_CLOSEDcases", acViewPreview
///////////
Dim stDocName As String
stRecords = "E"
stDocName = "r_EPO_Report"
If IsNull(Me.txtStartDate) Or IsNull(Me.txtEndDate) Then
MsgBox "Please make sure you entered a start and end date."
Exit Sub
Else
DoCmd.OpenReport stDocName, acPreview
End If