Page (tabbesturingselement)

E

Eef

Access 2003 has an option to make (on a form) pages with tabs. In Dutch
called "Tabbesturingselement")

I am looking for a way, to start procedures, depending on which tab has been
activated.

If active tab = A, do this,
If active tab = B, do that.

Thanks in advance
Eef Houniet
 
R

Rick Brandt

Eef said:
Access 2003 has an option to make (on a form) pages with tabs. In
Dutch called "Tabbesturingselement")

I am looking for a way, to start procedures, depending on which tab
has been activated.

If active tab = A, do this,
If active tab = B, do that.

Thanks in advance
Eef Houniet

Use the Change Event of the TabControl and test its Value property. The
Value will be zero when you select the first page, 1 when you select the
second page, and so on.
 
K

Ken Sheridan

Eef:

The values of pages of a tab control are numbers starting with 0 for the
first page, 1 for the second and so on, so:

Select Case Me.[YourTabControl]
Case 0 ' first page
' do something
Case 1 ' second page
' do something else
End Select

Ken Sheridan
Stafford, England
 
E

Eef

Rick,

You instruct me "test its Value property", but there is my problem.
I tried several variations, like the one below, without succes.
Could you please help me?

Private Sub TabbestEl23_Change()

If Page.PageIndex = 1 Then
MsgBox "Message"
End If

End Sub


Eef Houniet
 
R

Rick Brandt

Eef said:
Rick,

You instruct me "test its Value property", but there is my problem.
I tried several variations, like the one below, without succes.
Could you please help me?

Private Sub TabbestEl23_Change()

If Page.PageIndex = 1 Then
MsgBox "Message"
End If

End Sub

I meant "Value property of the TabControl" quite literally...

Private Sub TabbestEl23_Change()

If TabbestEl23.Value = 1 Then
MsgBox "Message"
End If

End Sub
 

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