|
Prev: Crosstab Date Range Problem
Next: Back-up Bob Larson
From: Eef on 5 Jul 2008 06:28 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 5 Jul 2008 07:53 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 5 Jul 2008 08:04 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 5 Jul 2008 08:31 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 5 Jul 2008 09:01 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
|
Pages: 1 Prev: Crosstab Date Range Problem Next: Back-up Bob Larson |