Using an Option Group

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form from which I want to allow the user to make
a selection: "select a category" or "all categories" to
print a report. I then have a combo box that displays a
category.

How do I code to print the report that the user chooses
from the option group and the combo box?

Thanks much for any help!
 
Try using a multi-select listbox rather than a combobox. It will make what you
are wanting to do much simpler.
 
Thank you for your suggestion. How do I code for a multi-
select listbox to print the categories selected from the
box?
 
You don't say how you implemented this, but let's assume you apply a filter
to the form when "Select a category" is selected, or when the combo is
updated, and you turn the filter off when "All categories" is selected.

In that case, all you need to do is pass your form's filter on to the
report:

Dim strFilter as String
If Me.FilterOn Then strFilter = Me.Filter
DoCmd.OpenReport "YourReport", , , strFilter
 
Back
Top