I have a form that contains 8 textboxes "Textbox30, Textbox31,
Textbox32, Textbox33, Textbox34, Textbox35, Textbox36, Textbox37".
This form is designed to allow the user to input up to eight Department
Codes. When they hit the submit button, it opens a report based off
the following query:
SELECT ra_report.CCENT ER, ra_report.BANK, ra_report.DIVIS ION,
ra_report.EMPNU M, ra_report.NAME, ra_report.TOKEN , ra_report.ASSIG NED,
ra_report.EXPIR ES, ra_report.USED
FROM ra_report;
Though I do not have it in the query, I am using the following
criteria: [forms]![SearchDept]![Textbox30] OR
[forms]![SearchDept]![Textbox31] OR etc.
Here is the problem. At this point, if all textboxes have values in
them, the report works great. However, if I do not use all eight, the
query returns all values due to the empty textboxes.
So, what I am looking for my be explained in the pseudocode below:
If textbox30 is NotNull, then use in the query... If textbox31 is
Notnull, then use in the query.. If textbox32 is null, do not use in
query...etc
Any suggestions would be welcomed!
Thank you very much!
~Drum2001
Textbox32, Textbox33, Textbox34, Textbox35, Textbox36, Textbox37".
This form is designed to allow the user to input up to eight Department
Codes. When they hit the submit button, it opens a report based off
the following query:
SELECT ra_report.CCENT ER, ra_report.BANK, ra_report.DIVIS ION,
ra_report.EMPNU M, ra_report.NAME, ra_report.TOKEN , ra_report.ASSIG NED,
ra_report.EXPIR ES, ra_report.USED
FROM ra_report;
Though I do not have it in the query, I am using the following
criteria: [forms]![SearchDept]![Textbox30] OR
[forms]![SearchDept]![Textbox31] OR etc.
Here is the problem. At this point, if all textboxes have values in
them, the report works great. However, if I do not use all eight, the
query returns all values due to the empty textboxes.
So, what I am looking for my be explained in the pseudocode below:
If textbox30 is NotNull, then use in the query... If textbox31 is
Notnull, then use in the query.. If textbox32 is null, do not use in
query...etc
Any suggestions would be welcomed!
Thank you very much!
~Drum2001
Comment