Populate option group from table

  • Thread starter Thread starter Leslie Isaacs
  • Start date Start date
L

Leslie Isaacs

Hello All

Is it possible to populate an option group from a table?

I have a table [event_categories], which is added to from time to time.
I have an option group on a form, which is used to specify which category to
include for a report. Currently the option group has an option value for
each record in [event_categories], which I have created manually. Whenever a
new record is added to [event_categories], I have to manually add another
'option' to the option group control - and I have to update the filter (in
the on-open event of the report).

Obviously it would be better if any new records in [event_categories] were
automatically added to the option group - and it would be fantastic if the
filter could also be updated to take account of the new 'event category'.

I would be very grateful for any help.

Many thanks
Leslie Isaacs
 
I don't think that is possible nor a good idea. What happens when there are
too many different values in the table and your option group takes over your
whole form.

I would use a combobox instead and set its RecordSource to be a Group By
query on the particular field. that way will display each unique value that
appears in the field. Users just select from the list what option they want
and away they go. If you need to you can do a Requery on the combobox to
updates its contents.

Tony V
 
Back
Top