Option group: How to store selected button?

Real Wally

Registered User.
Local time
Today, 22:19
Joined
Jan 28, 2003
Messages
107
Hi,

On my form I have an option group with 4 radio buttons. Depending on the button selected certain fields become visible. This works all fine. Problem is though that I don't know how to store the selected value. At the moment, every time you open the form you have to select the same button to see the info stored in the fields that become visible. I guess that I'll have to somehow store the value for the selected buttons in the table. But How? Do I refer to the frame and store the value corresponding to the number of button (1, 2, 3 or 4) or do I store the balue for each button seperately?
I've played with it for too long now and cannot find the golden tip. Please advice.

Thanks,

Walt
 
refer to the frame and store the value corresponding to the number of button
 
So just to elaborate, if you had a frame with 3 options say called Confidentiality levels:
option 1 - everything
option 2 - name
option 3 - address

you would have your frame rowsource as Confidentiality in your Main form with a relationship between Details_Id in tblConfidentiality and Confidentiality in Main form.
tblConfidentiality would contain: Details_Id(PK) And Confidentiality.
Relationship type would be Many To One.
hth
Chris
 
Thanks for that Newman and Dopeman. I think I understand what you mean. Unfortunately I'm not smart enough to really get it, i.e. I cannot get it to work.

I've done the following:
The optiongroup is called fraMyOptions and has 4 buttons: Option1, Option2 Option3 nd Option4.
The main table has a row fraMyOptions that looks up the value in the field "choice" of the table Tbl_ChooseOption. The other field in that table is called fraMyOptionsID and is the key.

That is how I understood your suggestions. I probably misunderstood cause I cannot get it to work. Could you give me another hint?

Thanks again,
Walt
 
In an option group, you don't refer to the individual buttons, you refer to the frame object that contains the group. It is the frame that is bound to the form's RecordSource so no code is required to save it or set it.

You may need to delete your controls and then rebuild the group to get it to work properly if you didn't build it correctly in the beginning. When you add the frame control to your form, the wizard should pop up and guide you through the process.
 

Users who are viewing this thread

Back
Top Bottom