Radio button event

G

Guest

On a form, there are just 2 radio buttons; nothing else is on the form. My
user will select either one as neither will be default. I want an "On Click"
event for that radio button but that isn't an option. The "On Got Focus"
event doesn't trigger either. I don't want to put an action button on the
form.

Any suggestions?
tia
 
B

Brendan Reynolds

After Update?

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
G

Guest

Thanks for the quick reply. I actuall got it.

The On Got Focus is working for what I want it to do.

thanks again,
JMorrell
 
D

Dirk Goldgar

JMorrell said:
On a form, there are just 2 radio buttons; nothing else is on the
form. My user will select either one as neither will be default. I
want an "On Click" event for that radio button but that isn't an
option. The "On Got Focus" event doesn't trigger either. I don't
want to put an action button on the form.

If the user can select only one of these buttons, then they belong in an
option group. If that's so, then the AfterUpdate event of the option
group frame is what you want to use.
 
B

Brendan Reynolds

Something has to have focus. If there are no other controls on the form, one
of those two option buttons has to have the focus. (You could disable them,
in which case the form itself would have the focus, but then the user would
not be able to select either of the controls.) You could add another control
to the form, set its Visible property to False and its Tab Index property to
0, then it would be the first control to receive the focus. But I don't
understand why you can't use the AfterUpdate event?

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
G

Guest

I actually put the event on the option group, which has an On Click event
procedure. Then used Select Case...End Select code to get what I wanted. I
don't know if that's the most elegant way, but it worked for my needs.

Thanks to everyone for your help!
JMorrell
 
D

Dirk Goldgar

"Brendan Reynolds" <brenreyn at indigo dot ie> wrote in message
[...] You could add another control to the form, set its Visible
property to False and its Tab Index property to 0, then it would be
the first control to receive the focus.

Brendan, I don't think an invisible control is going to receive the
focus. One could make the control infinitesimal in size while leaving
it visible, though.
 
B

Brendan Reynolds

Oops! That'll teach me to post without testing. You can do it with a command
button without having to make it infinitesimally small, though, by setting
the Transparent property to True. (The advantage is that it's a lot easier
to find in design view! :)

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


Dirk Goldgar said:
"Brendan Reynolds" <brenreyn at indigo dot ie> wrote in message
[...] You could add another control to the form, set its Visible
property to False and its Tab Index property to 0, then it would be
the first control to receive the focus.

Brendan, I don't think an invisible control is going to receive the
focus. One could make the control infinitesimal in size while leaving
it visible, though.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 

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

Similar Threads


Top