Combo box criteria for a report

  • Thread starter Thread starter Todd
  • Start date Start date
T

Todd

I asked this question a couple weeks ago and got a
response but I didn't have a chance to try the
recommendation until now. The suggestion was referencing
the Access web site under Forms: Adding "All" to a listbox
or combobox.

I''m apparently doing something wrong. Here's how my
reports menu is set up. Listed on a form I've got option
buttons where I select reports to print. I've got a report
that has a combo box directly under it so if I select that
report I must use the combo box to select a category for
the report to display that categories info or else nothing
will show up on the report.

This works but I'd like to have it where if the combo box
is left blank, or something like this, all the categories
will be displayed on the report when it's opened. Help!

FYI: Here is how my combo box is set up because maybe
I've done it a different way. I've got a separate table1
which lists all the categories. Under another table2 I've
got a field that I've classified as a combobox under the
lookup tab referencing table1 as my combo box. Is this
the best way to create a combo box?
 
I assume that your report uses a query as its RecordSource. In that query,
the criteria expression for the field that uses the combo box as its data
value should have this expression (replace generic names with your real
names):

[Forms]![FormName]![ComboBoxName] Or [Forms]![FormName]![ComboBoxName] Is
Null
 
Thanks! Works like a charm.
-----Original Message-----
I assume that your report uses a query as its RecordSource. In that query,
the criteria expression for the field that uses the combo box as its data
value should have this expression (replace generic names with your real
names):

[Forms]![FormName]![ComboBoxName] Or [Forms]![FormName]! [ComboBoxName] Is
Null


--

Ken Snell
<MS ACCESS MVP>

I asked this question a couple weeks ago and got a
response but I didn't have a chance to try the
recommendation until now. The suggestion was referencing
the Access web site under Forms: Adding "All" to a listbox
or combobox.

I''m apparently doing something wrong. Here's how my
reports menu is set up. Listed on a form I've got option
buttons where I select reports to print. I've got a report
that has a combo box directly under it so if I select that
report I must use the combo box to select a category for
the report to display that categories info or else nothing
will show up on the report.

This works but I'd like to have it where if the combo box
is left blank, or something like this, all the categories
will be displayed on the report when it's opened. Help!

FYI: Here is how my combo box is set up because maybe
I've done it a different way. I've got a separate table1
which lists all the categories. Under another table2 I've
got a field that I've classified as a combobox under the
lookup tab referencing table1 as my combo box. Is this
the best way to create a combo box?


.
 
Back
Top