Conflicting events

J

JustinP

I have a form that has a two toggle buttons (grouped) and two tab
controls (with several pages on each).. What is supposed to happen is
that when when one of the toggle buttons is pressed, the other is
un-pressed and one of the tab controls is visible while the other is
hidden. There is an "On Change" event associated with each tab control
that obviously fires when a page is clicked on (it enables or disables
a command button depending on which page is selected). Unfortunately
both the "On Change" events are also fired when a toggle button is
pressed.

Any ideas on a workaround for this?
 
J

JustinP

Sorted it. A few If Me.ToggleButton.Value = 1 Then statements in the
right places did the trick...

Often just having to type up the problem gets me halfway to solving it
;)
 
D

David W. Fenton

I have a form that has a two toggle buttons (grouped) and two tab
controls (with several pages on each).. What is supposed to happen
is that when when one of the toggle buttons is pressed, the other
is un-pressed and one of the tab controls is visible while the
other is hidden. There is an "On Change" event associated with
each tab control that obviously fires when a page is clicked on
(it enables or disables a command button depending on which page
is selected). Unfortunately both the "On Change" events are also
fired when a toggle button is pressed.

Any ideas on a workaround for this?

Use an option group with toggle buttons instead, because then the
toggle buttons don't really have their own values, but the option
group has the value instead.
 

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