Another Tab Control Problem

  • Thread starter Afrosheen via AccessMonster.com
  • Start date
A

Afrosheen via AccessMonster.com

First of all Thanks for reading this.

I too have the problem of the code not firing onClick and I know about
clicking on the page. I looked for the On Change command within the tab event
properties. The only place I can see the onChange is on the form its self. I
tried using the MS suggestion and that didn't work. This is their code.

Private Sub Form_SelectionChange()
Select Case Me!TabCtl3.Value ' Returns Page Index.
Case 0 ' Page Index for Page 1.
MsgBox "You have selected Company Info"
Case 3 ' Page Index for Page 4.
MsgBox "You have selected Personal Info"
End Select
End Sub

My tab control name is:page4. What I want is when I click on the tab it will
fire the event.

Any suggestions?
Thanks again
 
D

Dirk Goldgar

Afrosheen via AccessMonster.com said:
First of all Thanks for reading this.

I too have the problem of the code not firing onClick and I know about
clicking on the page. I looked for the On Change command within the tab
event
properties. The only place I can see the onChange is on the form its self.
I
tried using the MS suggestion and that didn't work. This is their code.

Private Sub Form_SelectionChange()
Select Case Me!TabCtl3.Value ' Returns Page Index.
Case 0 ' Page Index for Page 1.
MsgBox "You have selected Company Info"
Case 3 ' Page Index for Page 4.
MsgBox "You have selected Personal Info"
End Select
End Sub

My tab control name is:page4. What I want is when I click on the tab it
will
fire the event.

Any suggestions?


The form's SelectionChange event is not what you want. I guarantee you that
an Access tab control has a Change event. However, to get to the properties
of the tab control, rather than those of its individual pages, you have to
select it carefully. Don't click on any of the tabs or pages; click on the
area just to the right of the last tab, or the very edge of the tab control.
If you can't seem to get at it that way, open the property sheet for any
control on the form, and then enter the name of the tab control in the
drop-down box at the very top of the sheet.
 
A

Afrosheen via AccessMonster.com

Hi Dirk,
Thanks for the help. I did find it. Now all I have to do is set it up to fire
the code. Thanks again



Dirk said:
First of all Thanks for reading this.
[quoted text clipped - 19 lines]
Any suggestions?

The form's SelectionChange event is not what you want. I guarantee you that
an Access tab control has a Change event. However, to get to the properties
of the tab control, rather than those of its individual pages, you have to
select it carefully. Don't click on any of the tabs or pages; click on the
area just to the right of the last tab, or the very edge of the tab control.
If you can't seem to get at it that way, open the property sheet for any
control on the form, and then enter the name of the tab control in the
drop-down box at the very top of the sheet.
 

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