Option groups

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

Guest

Nothing I have looked at eg help, user answers explains how you link the options in an option group to a particular field. The option group wizard sets up options but unless its link to a field how does it work. I don't want to put values in a field I want to use it to filter based on values in the option group.

Eg invoice status might be active or closed and I want to use option group to view all invoices of a particular status. I can create the options using the wizard but nowhere does it ask me which field eg InvStatus is it looking at.
 
Lennie,

For serving as a folter, your option group should NOT be bound to any table
field!
One way to do this is to create a select query on the table, and enter a
reference to the option group in the criteria line under the invoice status
field, e.g. something like:

Forms!FormName!OptionGroupName

So every time the query is run it will take the current option group
selection from the form, and use it as a criterion.

HTH,
Nikos

Lennie said:
Nothing I have looked at eg help, user answers explains how you link the
options in an option group to a particular field. The option group wizard
sets up options but unless its link to a field how does it work. I don't
want to put values in a field I want to use it to filter based on values in
the option group.
Eg invoice status might be active or closed and I want to use option group
to view all invoices of a particular status. I can create the options using
the wizard but nowhere does it ask me which field eg InvStatus is it looking
at.
 
Nothing I have looked at eg help, user answers explains how you link
the options in an option group to a particular field. The option
group wizard sets up options but unless its link to a field how
does it work. I don't want to put values in a field I want to use
it to filter based on values in the option group.

Eg invoice status might be active or closed and I want to use
option group to view all invoices of a particular status. I can
create the options using the wizard but nowhere does it ask me
which field eg InvStatus is it looking at.

The wizard does offer you the choice of where to store the OptionGroup
value. The 4th page offers the choice of what to do with the
selection; Save value for future use .. or Store the value in what
field? Store the value is what field should have been checked, and
the field InvStatus selected in the drop-down box.

Using the current OptionGroup, set it's Control Source property to the
name of the field in the table ([InvStatus]).

An Option Group's value is a Long Integer number, so make sure
InvStatus datatype is also a Long Integer number.
 
Back
Top