By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,550 Members | 2,725 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,550 IT Pros & Developers. It's quick & easy.

Option Button Problem

P: n/a

Hello everyone,

I have a form with an option button on it. I am having problems to set
the value of this to is previous state/selection.

For instance if someone navigates from the main menu to the specific
form and selects an option and the back to the main menu. If they go
back to the form i want the previous option to be selected.

Any ideas please. Thanks in advance for your help.

Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Andy K wrote:

Hello everyone,

I have a form with an option button on it. I am having problems to set
the value of this to is previous state/selection.

For instance if someone navigates from the main menu to the specific
form and selects an option and the back to the main menu. If they go
back to the form i want the previous option to be selected.

Any ideas please. Thanks in advance for your help.

If I understand your situation...not sure what an option is and what
value of an option to save...you could create a field on your main form
to store a value. When an "option" is selected, it checks to see if the
main form is open and if it is, sets a value to that field in the main form.

Sub Option_AfterUpdate()
If IsOpen("MainForm") then 'see Syscmd to create IsOpen function
Forms!MainForm!OptionField = "Whatever"
Endif

Then, when you open the form from the mainform, you can check the value.
Ex:
If IsNull(Me.OptionField) Then
Docmd.openform "Test"
Else
Docmd.Openform "Test",,,"ID = " & Me.OptionField
Endif

Nov 12 '05 #2

P: n/a
If you bind the option button to a field in the record source of your form, then
the option button will always have the value you previously selected.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Andy K" <a.********@londonmet.ac.uk> wrote in message
news:c6**********@canard.ulcc.ac.uk...

Hello everyone,

I have a form with an option button on it. I am having problems to set
the value of this to is previous state/selection.

For instance if someone navigates from the main menu to the specific
form and selects an option and the back to the main menu. If they go
back to the form i want the previous option to be selected.

Any ideas please. Thanks in advance for your help.

Nov 12 '05 #3

P: n/a
I haven't tested this but.....
What if you change the default value of the option control in its
After-Update event?
Fred Zuckerman
San Diego, CA, USA
"Andy K" <a.********@londonmet.ac.uk> wrote in message
news:c6**********@canard.ulcc.ac.uk...

Hello everyone,

I have a form with an option button on it. I am having problems to set
the value of this to is previous state/selection.

For instance if someone navigates from the main menu to the specific
form and selects an option and the back to the main menu. If they go
back to the form i want the previous option to be selected.

Any ideas please. Thanks in advance for your help.

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.