A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Tab Control and on click events.



 
 
Thread Tools Display Modes
  #1  
Old June 3rd, 2004, 03:21 PM
Mike
external usenet poster
 
Posts: n/a
Default Tab Control and on click events.

How come the label of the tab does not register the on
click event?

For example, when the user clicks a tab, I want it to
switch pages, but I also want to change the record source
of a subform. However, the on click event is not activated
when clicking the tab label.

__________ ___________
/Hello \/Good Bye \_________________________
| |
| |

For example, when the user clicks "Hello", I want it to
register an event, so I figured it would be the on click
event. However, this does not seem to be the case.

Is there any way I can make it so that when the user
clicks "Hello", it can register a Macro or VB Code?




  #2  
Old June 3rd, 2004, 03:45 PM
Wayne Morgan
external usenet poster
 
Posts: n/a
Default Tab Control and on click events.

In design mode, click the background of the tab control to the right of the
Good Bye tab. You will now have a Change event available for the tab
control. This event will fire when you move from one page to the next.

--
Wayne Morgan
Microsoft Access MVP


"Mike" wrote in message
...
How come the label of the tab does not register the on
click event?

For example, when the user clicks a tab, I want it to
switch pages, but I also want to change the record source
of a subform. However, the on click event is not activated
when clicking the tab label.

__________ ___________
/Hello \/Good Bye \_________________________
| |
| |

For example, when the user clicks "Hello", I want it to
register an event, so I figured it would be the on click
event. However, this does not seem to be the case.

Is there any way I can make it so that when the user
clicks "Hello", it can register a Macro or VB Code?






  #3  
Old June 3rd, 2004, 04:05 PM
Mike
external usenet poster
 
Posts: n/a
Default Tab Control and on click events.

______ ________ ____________
/Hello \/Good Bye\/Good Morning\_________________

Thank you for the help. However, I need it to be a little
more specific than that. If the On Change event is
activated, how do I find out which tab was click?

This is a fictional example:
I am currently in the "Hello" tab, and a text box
says "Hello, Mike". Now, I click on the Good Bye tab, so
it can display "Good Bye, Mike". The On Change event is
activated, but how do I know whether or not the user
clicked on the "Good Bye" or "Good Morning" tab? I want
the text box to display "Good Bye, Mike" or "Good Morning,
Mike" depending on which tab is selected.
Is there a property for the tab control, such as
TabControl.CurrentPage or something?

Any further help would be greatly appreciated.

-----Original Message-----
In design mode, click the background of the tab control

to the right of the
Good Bye tab. You will now have a Change event available

for the tab
control. This event will fire when you move from one page

to the next.

--
Wayne Morgan
Microsoft Access MVP


"Mike" wrote in message
...
How come the label of the tab does not register the on
click event?

For example, when the user clicks a tab, I want it to
switch pages, but I also want to change the record

source
of a subform. However, the on click event is not

activated
when clicking the tab label.

__________ ___________
/Hello \/Good Bye \_________________________
| |
| |

For example, when the user clicks "Hello", I want it to
register an event, so I figured it would be the on click
event. However, this does not seem to be the case.

Is there any way I can make it so that when the user
clicks "Hello", it can register a Macro or VB Code?






.

  #4  
Old June 3rd, 2004, 04:05 PM
Mike
external usenet poster
 
Posts: n/a
Default Tab Control and on click events.

______ ________ ____________
/Hello \/Good Bye\/Good Morning\_________________

Thank you for the help. However, I need it to be a little
more specific than that. If the On Change event is
activated, how do I find out which tab was click?

This is a fictional example:
I am currently in the "Hello" tab, and a text box
says "Hello, Mike". Now, I click on the Good Bye tab, so
it can display "Good Bye, Mike". The On Change event is
activated, but how do I know whether or not the user
clicked on the "Good Bye" or "Good Morning" tab? I want
the text box to display "Good Bye, Mike" or "Good Morning,
Mike" depending on which tab is selected.
Is there a property for the tab control, such as
TabControl.CurrentPage or something?

Any further help would be greatly appreciated.

-----Original Message-----
In design mode, click the background of the tab control

to the right of the
Good Bye tab. You will now have a Change event available

for the tab
control. This event will fire when you move from one page

to the next.

--
Wayne Morgan
Microsoft Access MVP


"Mike" wrote in message
...
How come the label of the tab does not register the on
click event?

For example, when the user clicks a tab, I want it to
switch pages, but I also want to change the record

source
of a subform. However, the on click event is not

activated
when clicking the tab label.

__________ ___________
/Hello \/Good Bye \_________________________
| |
| |

For example, when the user clicks "Hello", I want it to
register an event, so I figured it would be the on click
event. However, this does not seem to be the case.

Is there any way I can make it so that when the user
clicks "Hello", it can register a Macro or VB Code?






.

  #5  
Old June 3rd, 2004, 04:54 PM
Wayne Morgan
external usenet poster
 
Posts: n/a
Default Tab Control and on click events.

The Value of the Tab Control is the page index. Here is an example.

http://support.microsoft.com/default.aspx?kbid=198639

--
Wayne Morgan
Microsoft Access MVP


"Mike" wrote in message
...
______ ________ ____________
/Hello \/Good Bye\/Good Morning\_________________

Thank you for the help. However, I need it to be a little
more specific than that. If the On Change event is
activated, how do I find out which tab was click?

This is a fictional example:
I am currently in the "Hello" tab, and a text box
says "Hello, Mike". Now, I click on the Good Bye tab, so
it can display "Good Bye, Mike". The On Change event is
activated, but how do I know whether or not the user
clicked on the "Good Bye" or "Good Morning" tab? I want
the text box to display "Good Bye, Mike" or "Good Morning,
Mike" depending on which tab is selected.
Is there a property for the tab control, such as
TabControl.CurrentPage or something?

Any further help would be greatly appreciated.

-----Original Message-----
In design mode, click the background of the tab control

to the right of the
Good Bye tab. You will now have a Change event available

for the tab
control. This event will fire when you move from one page

to the next.

--
Wayne Morgan
Microsoft Access MVP


"Mike" wrote in message
...
How come the label of the tab does not register the on
click event?

For example, when the user clicks a tab, I want it to
switch pages, but I also want to change the record

source
of a subform. However, the on click event is not

activated
when clicking the tab label.

__________ ___________
/Hello \/Good Bye \_________________________
| |
| |

For example, when the user clicks "Hello", I want it to
register an event, so I figured it would be the on click
event. However, this does not seem to be the case.

Is there any way I can make it so that when the user
clicks "Hello", it can register a Macro or VB Code?






.



  #6  
Old June 3rd, 2004, 04:55 PM
Rick Brandt
external usenet poster
 
Posts: n/a
Default Tab Control and on click events.

"Mike" wrote in message
...
______ ________ ____________
/Hello \/Good Bye\/Good Morning\_________________

Thank you for the help. However, I need it to be a little
more specific than that. If the On Change event is
activated, how do I find out which tab was click?


The Value property of the TabControl will correspond to the index of the
selected page.


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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:03 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.