how do I uncheck option group?

D

dlazenby

I have a form with some option groups. The default choice is set to no
choice, so it does start out blank.
My question, once you "invoke" that option group you always have to have one
of them selected. Is it possible to reset it to blank/no choices and how?
Please advise.
 
R

Rick Brandt

dlazenby said:
I have a form with some option groups. The default choice is set to no
choice, so it does start out blank.
My question, once you "invoke" that option group you always have to
have one of them selected. Is it possible to reset it to blank/no
choices and how? Please advise.

You need code to reset the value to Null. A clear button next to the
OptionGroup for example.
 
D

dlazenby

Rick,
Thanks for your reply. I put a button on the form and I used the command
button wizard for Form Operations but there were no relevant commands. I also
tried to do it with a macro, by looking for a relevant command there. As you
might surmise, I am not very code knowledgeable.
Could you elaborate (specific steps) on your suggestion?
 
R

Rick Brandt

dlazenby said:
Rick,
Thanks for your reply. I put a button on the form and I used the
command button wizard for Form Operations but there were no relevant
commands. I also tried to do it with a macro, by looking for a
relevant command there. As you might surmise, I am not very code
knowledgeable.
Could you elaborate (specific steps) on your suggestion?

Me!OptionGroupFrameName = Null

(or)

Me!FieldName = Null
 
D

dlazenby

Rick,
Thanks for your reply and patience. We're almost there.
Regarding the Me!OptionGroupFrameName = Null suggestion, what I tried to do
(unsuccessfully), was create a button (without the wizard), and then in the
On Click
section of the button properties insert that code in the expression builder.
I substituted Frame8 for the option group frame name as that is the name of
that particular option group frame. So now to the right of the On Click
property it reads: [Me!Frame8 = Null]. When I open the form and click the
button, I get the error message, "Microsoft Access can't find the object
'[Me!Frame8=Null].' If '[Me!Frame8 = Null]' is a new macro or macro group,
make sure you have save it and typed its name correctly."
Please advise.
 
D

dlazenby

Rick,
I was able to figure it out (doh!). I inserted your code in the VBA section
instead of the expression builder and it worked. Thanks again.

dlazenby said:
Rick,
Thanks for your reply and patience. We're almost there.
Regarding the Me!OptionGroupFrameName = Null suggestion, what I tried to do
(unsuccessfully), was create a button (without the wizard), and then in the
On Click
section of the button properties insert that code in the expression builder.
I substituted Frame8 for the option group frame name as that is the name of
that particular option group frame. So now to the right of the On Click
property it reads: [Me!Frame8 = Null]. When I open the form and click the
button, I get the error message, "Microsoft Access can't find the object
'[Me!Frame8=Null].' If '[Me!Frame8 = Null]' is a new macro or macro group,
make sure you have save it and typed its name correctly."
Please advise.
Rick Brandt said:
Me!OptionGroupFrameName = Null

(or)

Me!FieldName = Null
 

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