S
Steve
Hi.
I have a form with five combo boxes, each have a row
source that pulls data from a table with the same name as
the combo box.
Org (10 to choose from) pulls from table named "Org"
BU (4 to choose from) pulls from talble named "BU"
IOO (6 to choose from) pulls from table named "IOO"
IBO (100 to choose from) pulls from table named "IBO"
Item (100,000 to choose from) pulls from table "ALL"
I have a command button that runs a query
named "Output_Detail" on click of the command button. The
query has the following in the criteria line for these
fields:
Org field: [Forms]![EOData]![Org]
BU field: [Forms]![EOData]![BU]
IOO field: [Forms]![EOData]![IOO]
IBO field: [Forms]![EOData]![IBO]
Item field: [Forms]![EOData]![Item]
The problem is this: if only the org is selected, the
query is interpreting the other fields as having some
value that is not found in my table (which is
named "ALL"), and the query returns no records. I added a
blank record to the BU, IOO, and IBO tables hoping that if
nothing was selected in these combo boxes, that the field
criteria in my query would default to blanks (as if there
were no filters for those fields), and would then give me
all records for the org selected (for example, if F01 was
selected for org, the only criteria/filter in my query
would be to pull all records from my "ALL" table that have
F01 as the org).
I found a "default" field in my combo box data properties.
Is there a value I can enter here so that if no existing
field is selected in the combo box, that this default
value would be read into my query criteria field?
I have a form with five combo boxes, each have a row
source that pulls data from a table with the same name as
the combo box.
Org (10 to choose from) pulls from table named "Org"
BU (4 to choose from) pulls from talble named "BU"
IOO (6 to choose from) pulls from table named "IOO"
IBO (100 to choose from) pulls from table named "IBO"
Item (100,000 to choose from) pulls from table "ALL"
I have a command button that runs a query
named "Output_Detail" on click of the command button. The
query has the following in the criteria line for these
fields:
Org field: [Forms]![EOData]![Org]
BU field: [Forms]![EOData]![BU]
IOO field: [Forms]![EOData]![IOO]
IBO field: [Forms]![EOData]![IBO]
Item field: [Forms]![EOData]![Item]
The problem is this: if only the org is selected, the
query is interpreting the other fields as having some
value that is not found in my table (which is
named "ALL"), and the query returns no records. I added a
blank record to the BU, IOO, and IBO tables hoping that if
nothing was selected in these combo boxes, that the field
criteria in my query would default to blanks (as if there
were no filters for those fields), and would then give me
all records for the org selected (for example, if F01 was
selected for org, the only criteria/filter in my query
would be to pull all records from my "ALL" table that have
F01 as the org).
I found a "default" field in my combo box data properties.
Is there a value I can enter here so that if no existing
field is selected in the combo box, that this default
value would be read into my query criteria field?