S
sexton75
I am trying to base a report on multiple selections from combo boxes. The
way I have it set up right now will only send back the results if a selection
is made on all combo boxes. Ideally, I would like to have multiple options
for the user to select from and based on only those selections filter the
results of the report. The code I have right now is as follows:
Private Sub ReportPreview_Click()
Dim strWhere As String
strWhere = "True"
If Not IsNull(Me!RptCat) Then
strWhere = strWhere & " AND [cat1id]= " & Me!RptCat & " AND [cat2id]= " & Me!
rptcat2 & " AND [cat3id]= " & Me!rptcat3
DoCmd.OpenReport "Rpt_AssetValuebytype", acViewPreview, , strWhere
End If
End Sub
Please help
way I have it set up right now will only send back the results if a selection
is made on all combo boxes. Ideally, I would like to have multiple options
for the user to select from and based on only those selections filter the
results of the report. The code I have right now is as follows:
Private Sub ReportPreview_Click()
Dim strWhere As String
strWhere = "True"
If Not IsNull(Me!RptCat) Then
strWhere = strWhere & " AND [cat1id]= " & Me!RptCat & " AND [cat2id]= " & Me!
rptcat2 & " AND [cat3id]= " & Me!rptcat3
DoCmd.OpenReport "Rpt_AssetValuebytype", acViewPreview, , strWhere
End If
End Sub
Please help