RESOLVED - filtering Report on the Fly
I have a form with 5 fields. The 5 fields are choices from the columns (20) in a table and the person can select which fields they want in the report. If the person selects "Supervisor" as a field in any of the 5 combo boxes, then I want another combo box (Not visible) to become visible and allow for filtering on a specific Supervisor in the report on the fly.
My problem is it will not filter on the Supervisor choice.
Sub MakeReport()
On Error GoTo Err_MakeReport
'Open report in design view to write properties to objects
If cboSupName.Visible = True Then
DoCmd.OpenReport "rptCustom", acDesign, , [Supervisor] = [Forms]![frmChooseFields]![cboSupName]
Else
DoCmd.OpenReport "rptCustom", acDesign
End If
How do I make this happen only if "Supervisor" is selected as a choice in one of the 5 fields?
I have a form with 5 fields. The 5 fields are choices from the columns (20) in a table and the person can select which fields they want in the report. If the person selects "Supervisor" as a field in any of the 5 combo boxes, then I want another combo box (Not visible) to become visible and allow for filtering on a specific Supervisor in the report on the fly.
My problem is it will not filter on the Supervisor choice.
Sub MakeReport()
On Error GoTo Err_MakeReport
'Open report in design view to write properties to objects
If cboSupName.Visible = True Then
DoCmd.OpenReport "rptCustom", acDesign, , [Supervisor] = [Forms]![frmChooseFields]![cboSupName]
Else
DoCmd.OpenReport "rptCustom", acDesign
End If
How do I make this happen only if "Supervisor" is selected as a choice in one of the 5 fields?
Last edited: