Creating Option Group

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

Guest

Hi,

One of my tables includes the following two Yes/No datatype fields: Draft,
Final.

When I place these two fields on my form, I want to enclose them in an
option group so that only one or the other may be selected. I tried using
the option group tool and placing the two fields inside it, but that did not
work.

What is the proper way to take two existing fields from a table and make
them into an option group when you place them on your form?

Many thanks,
 
Rosemary,

If I understand this correctly, a <whatever> represented by a record can
only be draft or final, not both, not neither, right?

If this is indeed the case, then you should only have one yes/no field
in your table; I'll assume it is called Final, and that when a record is
first created the default value is No (False), meaning not final yet =>
draft. Now, in your form design, add an option group and use the wizard
to enter two buttons, called Draft and Final (type in the first screen);
in the next screen, set the values for Draft to 0 and for Final to -1,
and in the next step bind the option group to the Final yes/no field in
the table, and you're done.
Just to explain, Yes (True) and No (False) are stored internally as -1
and 0 respectively, that the values in the option group.

HTH,
Nikos
 
Hi Nikos,

Thanks - perfect.

May I make one change: what if I want to have neither checkbox checked when
the form opens? Do I then set the value for both "Draft" and "Final"
checkboxes to 0?

thanks!
 
Hi Nikos,

Thanks - perfect.

May I make one change: what if I want to have neither checkbox checked when
the form opens? Do I then set the value for both "Draft" and "Final"
checkboxes to 0?

thanks!

Set the Default Value property (in the table) for this field to 0
(Zero).
All new records will automatically be No unless changed by the user.
 
Rosemary,

Clear the default value property (tab Data) of the option group; then do
the same for the table field it is bound to.

HTH,
Nikos
 
Back
Top