I have a form for generating reports base on 2 comboboxes. Randomly I am finding a filter set in the filter property of random reports which screws up what displays.
This doesn't happen to all reports... it is random but the filter that I find in the property is always the same Facility='Ripley'
The code for the form is
I try and try to make it show up in the property by setting the facility in the first combobox and then choosing the reports I found it set in the property but when I use the comboboxes it is never there. This is like the third time I have had to clear that same filter from 5 or 6 reports.
All reports are set to filter on load = No
I do have a field on the forms this is happening to that displays the facility name chosen from the first combobox on the form in the header of the reports but if I choose that facility that keeps showing up on the property I cannot get it to do it.
Anyone have some insight on how this might be happening or if there is some code I could put in a module for each report to clear that property on report close??
This doesn't happen to all reports... it is random but the filter that I find in the property is always the same Facility='Ripley'
The code for the form is
Code:
Option Compare Database
Option Explicit
Private Sub cmdGenerateReport_Click()
If Me.cboReports & "" <> "" Then
DoCmd.OpenReport cboReports, acViewReport, , IIf(IsNull(Me.cboFacility), "", "Facility='" & Me.cboFacility & "'")
Else
MsgBox ("You Must First Select a Report To Print!")
cboReports.SetFocus
End If
cboReports = ""
End Sub
I try and try to make it show up in the property by setting the facility in the first combobox and then choosing the reports I found it set in the property but when I use the comboboxes it is never there. This is like the third time I have had to clear that same filter from 5 or 6 reports.
All reports are set to filter on load = No
I do have a field on the forms this is happening to that displays the facility name chosen from the first combobox on the form in the header of the reports but if I choose that facility that keeps showing up on the property I cannot get it to do it.
Anyone have some insight on how this might be happening or if there is some code I could put in a module for each report to clear that property on report close??