From: Eef on
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


From: Rick Brandt on
Eef wrote:
> 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.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


From: Ken Sheridan on
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

"Eef" wrote:

> 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
>
>
>

From: Eef on
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

"Rick Brandt" <rickbrandt2(a)hotmail.com> schreef in bericht
news:ehJbk.31420$ZE5.18443(a)nlpi061.nbdc.sbc.com...
> Eef wrote:
>> 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.
>
> --
> Rick Brandt, Microsoft Access MVP
> Email (as appropriate) to...
> RBrandt at Hunter dot com
>


From: Rick Brandt on
Eef wrote:
> 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