Toggle buttons

C

Cherry

I created five toggle buttons on my forms so that users
can select different form to show up. For example: select
employee button to see employee detail or select report
to see report, but when user switch one to another form
it will hide the other(visible = false)

when I program the code on toggle button, I put them
under "On Got Focus". so, when user clicked on it and
hold it, the program will recognize that the button
already got focus eventhough users change their mind and
move mouse out. Is there anyway to protect in case user
doesn't change their mind and doesn't click on it.

Regard,
Cherry
 
P

Pavel Romashkin

I think that needs like that are best addressed by the AfterUpdate
events of the controls.

Pavel
 
C

Cherry

All toggle events property that I have are On Got Focus,
On Lost Focus, On Mouse Down, On Mouse Move, On key Down,
On Key Up, On Key Press.

I don't see AfterUpdate event. Please advise.

Cherry.
 
V

Vaibhav Agrawal

-----Original Message-----
I created five toggle buttons on my forms so that users
can select different form to show up. For example: select
employee button to see employee detail or select report
to see report, but when user switch one to another form
it will hide the other(visible = false)

when I program the code on toggle button, I put them
under "On Got Focus". so, when user clicked on it and
hold it, the program will recognize that the button
already got focus eventhough users change their mind and
move mouse out. Is there anyway to protect in case user
doesn't change their mind and doesn't click on it.

Regard,
Cherry
.


There is a very simple code that you need to write
inorder to get rid of this problem, you will have to
write nested if or iif statement on On_Click event of the
toggle buttons and will have to check in each if block
that whether the current toggle button is clicked or not.
 
P

Pavel Romashkin

Oops! On Click event - Vaibhav is right.
Sorry for the misleading post! I was thinking about text fields. My fault.

Pavel
 

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