Option group: How to store selected button? (1 Viewer)

Real Wally

Registered User.
Local time
Today, 02:14
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
 

Newman

Québécois
Local time
Yesterday, 21:14
Joined
Aug 26, 2002
Messages
766
refer to the frame and store the value corresponding to the number of button
 

dopedealer

Systems Analyst
Local time
Today, 02:14
Joined
Apr 6, 2005
Messages
145
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
 

Real Wally

Registered User.
Local time
Today, 02:14
Joined
Jan 28, 2003
Messages
107
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
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 21:14
Joined
Feb 19, 2002
Messages
43,266
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.
 

Real Wally

Registered User.
Local time
Today, 02:14
Joined
Jan 28, 2003
Messages
107
Did as Pat suggested and from there on it was real easy.
 

Users who are viewing this thread

Top Bottom