Option Groups Linked?

B

BethMc

I have two option group controls on one form. They are located next to each
other, but were created separately, using the Option Group Wizard each time.
Each group has two options, Accept or Decline - these are responses to
possible add-on items for vehicle rentals. One (CDW - Collision Damage
Waiver)) has values 1 and 2, the other (TDW - Tire Damage Waiver) uses 3 and
4. Each is supposed to govern the amount appearing in an unbound,
Currency-format text box.
The controls appear to be linked. As soon as an option is selected in
either box, nothing can be selected in the other one. Also, you can't change
your mind and change the selection in the first box.
Both controls are Enabled - Yes, Locked - No.
I've deleted the second group and re-created it again, using the
Wizard. It still respond as one group with the other one. How do I get them
to work independently?
Thank you!
 
J

Jeanette Cunningham

BethMc,
The option groups need to be unbound.
That means that they don't have any control source.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
B

BethMc

Hi, Jeanette - Thank you very much for your reply, but I'm still up a tree.
If I leave the Option Groups unbound, how do I record the choices? I
would bind the boxes showing the cost instead, but those have to be left
unbound in order to use an expression to populate them, don't they? (In this
case, =IIf([CDW] =1,14.95,0) and =IIf([TDW]=3,12.95,0))
If I can't bind either the choice or the result, how do I record what was
chosen?
Each group is bound to a different control source (TDW and CDW) - how
does that let them function as one choice group allowing only one choice for
all?
This newbie is confoozled... Thank you for any further help you can give!
BethMc
 
J

Jeanette Cunningham

Hi Beth,
There is no reason why the text boxes for cost need to be unbound if you
want to set their value using IIf based on an option group.
You can use the after update event of the option group to set the value for
the text box.

Select Case Me.OptGrpName
Case 1
Me.CostTxtBoxName = 14.95

Case Else
Me.CostTxtBoxName = 0
End Select


Replace the obvious with your control names.

If each option group is bound to a different control source, that would not
cause them to be linked.
There must be something else that is interferring.
Have you checked the query that is the form's recordsource to see if there
is a problem with the way the tables are related or the joins in the query?
Do a test on your form or on a copy of your form by commenting out all the
other code on the form that is not related to either of the option groups or
the unbound text boxes for cost. See if they function independently under
these conditions.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


BethMc said:
Hi, Jeanette - Thank you very much for your reply, but I'm still up a
tree.
If I leave the Option Groups unbound, how do I record the choices? I
would bind the boxes showing the cost instead, but those have to be left
unbound in order to use an expression to populate them, don't they? (In
this
case, =IIf([CDW] =1,14.95,0) and =IIf([TDW]=3,12.95,0))
If I can't bind either the choice or the result, how do I record what
was
chosen?
Each group is bound to a different control source (TDW and CDW) - how
does that let them function as one choice group allowing only one choice
for
all?
This newbie is confoozled... Thank you for any further help you can
give!
BethMc
--
Beth McCalley


Jeanette Cunningham said:
BethMc,
The option groups need to be unbound.
That means that they don't have any control source.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top