Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Parameter query works alone & with report, but not with combos on form

1 view
Skip to first unread message

heidii

unread,
Jun 7, 2010, 4:25:48 PM6/7/10
to
Hello Everyone:

I have a strange issue that I need help solving.
Here are my objects
1. Parameter query "qryMaterialAppsSearchLotNumber"
2. Search form "frmMaterialAppsSearch"
3. Report for query results "rptProductUsageSearchFert"

Problem:
on "frmMaterialAppsSearch" form, I have combo boxes for every
parameter listed in query.
comboLotNumber - required in query
comboAppType - required in query
txtStateDate - required in query
txtEndDate - required in query
comboCommodity - not required using is null feature in criteria
"[forms]![frmMaterialAppsSearch]![combocommodity] or [forms]!
[frmMaterialAppsSearch]![comboCommodity]is null"
comboBlockName - not required
comboOrganic - not required
comboVariety - not required

So here is the main problem. The query runs fine alone, I am prompted
for all parameters, and I enter Lot Number, Date Range, and App Type,
leaving the rest blank. Results return fine.

I open the report without using my form with the comboboxes, and the
report runs the query fine, prompting me with all parameters again,
again I enter the same criteria and get the results fine.

But.. If I use my form and enter the same data in the combo boxes on
the form, leaving the non required combo boxes blank, and open the
report. I get nothing. Played around for awhile, and found that if I
enter one of the non-required combo boxes with YES (comboOrganic),
then I get my results.

I am stumped on why my query is not running correctly when using the
combo boxes to enter the parameter criteria. I am running no code on
the form at this point to open the report. I am leaving the form open
and manually opening the report. So why is my query now requiring an
entry for comboOrganic?? This column in my query is listed as such:
"[forms]![frmMaterialAppsSearch]![comboOrganic] or [forms]!
[frmMaterialAppsSearch]![comboOrganic]is null". What am I am
missing. Please help.

I did not paste the query sql, because it is long.....

Just another note: I use the exact same query with the exact same
form, on another seperate report, and it runs fine not requiring me to
enter the data in comboOrganic. I am STUMPED...

Heidi

0 new messages