I am having some problems with figuring out how should handle report query.
I have a dropdown box, the user can select A or B or leave blank (Null).
If user selects A then then query should be BankNo = 77
If user selects B then then query should be BankNo <> 77
If user does not select anything then BankNo can be anything (no BankNo Criteria)
I tried to use ReportFilter and that works for A or B but if leave it blank it does not always clear the filter. Also I noticed you must always clear out the filter and make sure it is blank when save the report. But doesn't always fix the problem either.
For example My Query looks like the following:
SELECT UpdatedBy, LoanNumber, BankNo, AccountName
FROM tblMain1
WHERE BankNo Like ("*" & [Forms]![frmReportGenerator]![BankNo] & "*")
This works if user select A or leaves it blank (null) but it does not work with B (<>77)?
I have a report generator with about 100 reports that I want to use this same criteria. My resolution needs to be multipy funictional that I can apply to all my reports.
Any suggestions?
I have a dropdown box, the user can select A or B or leave blank (Null).
If user selects A then then query should be BankNo = 77
If user selects B then then query should be BankNo <> 77
If user does not select anything then BankNo can be anything (no BankNo Criteria)
I tried to use ReportFilter and that works for A or B but if leave it blank it does not always clear the filter. Also I noticed you must always clear out the filter and make sure it is blank when save the report. But doesn't always fix the problem either.
For example My Query looks like the following:
SELECT UpdatedBy, LoanNumber, BankNo, AccountName
FROM tblMain1
WHERE BankNo Like ("*" & [Forms]![frmReportGenerator]![BankNo] & "*")
This works if user select A or leaves it blank (null) but it does not work with B (<>77)?
I have a report generator with about 100 reports that I want to use this same criteria. My resolution needs to be multipy funictional that I can apply to all my reports.
Any suggestions?