Hi everyone!
So I am almost done with my form and everything works great. There is just one minor thing that I would like to accomplish, and any pointers would be awesome.
I have a ComboBox that has 3 types of reports in it. Each report is the same and the below VBA filters it by Type. Now I want the full report (not filtered) as an option.
I thought it would be easy to just put "" as part of the ComboBox and was hoping that the below would just accept it, and give me the full report, but it doesn't.
Here is the VBA for the Report Button Click, which grabs the value from the ComboBox:
Code:
Private Sub ReportBtn_Click()
Dim strType As String
Dim strReportName As String
strReportName = "TypeDisplay"
strType = "[Type] = """ & Me.ReportsCbo & """"
DoCmd.OpenReport strReportName, acViewPreview, , strType
Me.Form.Refresh
End Sub
The ComboBox values are:
East
West
North
South
Now if I could put "All" or "" in the ComboBox and figure out how to program the above VBA to accept it and produce a FULL REPORT (i.e. East, West, North and South all in one report), then that would smoke!
Perhaps it is an Else statement or something. Not sure, I am still new at this.
Thanks!
Phil