Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bind option groups to a table

Status
Not open for further replies.

Mary10k

IS-IT--Management
Nov 8, 2001
103
US
Hello,

I have 5 options in my option group and I am wondering how to bind these to a table so I can query on the options selected.

Thank you.
 
It is possible for you to set the Control Source of the option group to a field in your table. What this will do is set the value of the field to whichever selection was chosen in the option group, eg. 1, 2, 3, 4, or 5.

Hope this helps,
James
 
Thank you for the advice. I set the Control Source to a field in my table and now the option buttons are disabled.

Any advice?

Thanks.
 
Are you sure they are disabled? if the control source is set to a field which has a null value, the options will appear greyed, but you can still select one. If this is the case I'd simply add a bit of code which checked to see if the optiongroup value was null, and if so, set a default value such as 1. Let me know if this is the case.

James
 
I bound the control to my filed like thist "=[Disease Management]![I'm Unsure]" within the Control Source. I added a value of 1 and the option boxes are still grayed out and I can't select any of the buttons.

Thanks.
 
So you are trying to bind it to a field in a table that is different from the table you have set for your forms recordsource? you can't really do that. you need to bind the control to a field which is part of the current forms recordsource. if you want to change a value in a different table you'll need to leave the control unbound, then do the update manually using code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top