Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Criteria/Query Question

Status
Not open for further replies.

kayek

Programmer
Jun 19, 2003
95
US
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?
 
No One helped me out so I figured out a solution on my own. I added a YN flag to each of the report queries.

Thanks anyways.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top