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

Access 2000 Tab Control OnChange Event does nothing

P: n/a
Please Help.
I have a tab control with 4 tabs.
When a tab is selected, I want to "do stuff".
I thought to just do this:
Usint the tabControls OnChange event
If MyTabControl.Value = 0 then (the first tab is selected)
Do stuff...
End if

or use a select case 0 - 3 for each tab.

But the tabcontrol seems to ignore the OnChange Event.
This doesn't even doe anything

Private Sub MyTabControl_OnChange()
msgbox "hi"
end sub
????

any ideas.
Please can anyone help me.

Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"Rick" <Ri********@yahoo.com> wrote
I have a tab control with 4 tabs.
When a tab is selected, I want to "do stuff".
I thought to just do this:
Usint the tabControls OnChange event
If MyTabControl.Value = 0 then (the first tab is selected)
Do stuff...
End if

or use a select case 0 - 3 for each tab.

But the tabcontrol seems to ignore the OnChange Event.
This doesn't even doe anything

Private Sub MyTabControl_OnChange()
msgbox "hi"
end sub


Rick,

I use the OnChange event for tab controls. I check the tabs Value, just as
you say above. Works for me.

Perhaps something else is the problem.
Darryl Kerkeslager
Nov 13 '05 #2

P: n/a
Rick wrote:
Please Help.
I have a tab control with 4 tabs.
When a tab is selected, I want to "do stuff".
I thought to just do this:
Usint the tabControls OnChange event
If MyTabControl.Value = 0 then (the first tab is selected)
Do stuff...
End if

or use a select case 0 - 3 for each tab.

But the tabcontrol seems to ignore the OnChange Event.
This doesn't even doe anything

Private Sub MyTabControl_OnChange()
msgbox "hi"
end sub
????

any ideas.
Please can anyone help me.


Are you sure the OnChange property box has "[Event Procedure]" entered?

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #3

P: n/a

Rick Brandt wrote:
Rick wrote:
Please Help.
I have a tab control with 4 tabs.
When a tab is selected, I want to "do stuff".
I thought to just do this:
Usint the tabControls OnChange event
If MyTabControl.Value = 0 then (the first tab is selected)
Do stuff...
End if

or use a select case 0 - 3 for each tab.

But the tabcontrol seems to ignore the OnChange Event.
This doesn't even doe anything

Private Sub MyTabControl_OnChange()
msgbox "hi"
end sub
????

any ideas.
Please can anyone help me.
Are you sure the OnChange property box has "[Event Procedure]"

entered?
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


That was it. OMG I can't believe it.
Over a decade with Access and I didn't even look back at that.
Thank You !!!

Rick

Nov 13 '05 #4

P: n/a
Rick wrote:
Rick Brandt wrote:
Rick wrote:
Please Help.
I have a tab control with 4 tabs.
When a tab is selected, I want to "do stuff".
I thought to just do this:
Usint the tabControls OnChange event
If MyTabControl.Value = 0 then (the first tab is selected)
Do stuff...
End if

or use a select case 0 - 3 for each tab.

But the tabcontrol seems to ignore the OnChange Event.
This doesn't even doe anything

Private Sub MyTabControl_OnChange()
msgbox "hi"
end sub
????

any ideas.
Please can anyone help me.


Are you sure the OnChange property box has "[Event Procedure]"


entered?
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com

That was it. OMG I can't believe it.
Over a decade with Access and I didn't even look back at that.
Thank You !!!

Rick


This can happen if you cut and paste controls, an easy way to re-connect
event procedures is go to the module, Press Ctrl+A then Ctrl+X then
Ctrl+V. That will re-connect them all (provided no names have changed in
the meantime).
--
This sig left intentionally blank
Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.