Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: macro and tab controls


Message #1 by "Noel Wilson" <nwilson4@t...> on Wed, 19 Dec 2001 17:53:40
How do I write an event macro to go to another page in a tab control.  

goto page wont work on this type of form.
Message #2 by "John Ruff" <papparuff@c...> on Wed, 19 Dec 2001 10:31:48 -0800
I have a commands button on each of my tabs that the user presses to go

to the previous tab or the next tab.



Here is the way I move to the next/first tab



      ' tabControl1 is the name of my tab control

	

	' If this is the last tab, move to the first tab _

		otherwise move to the next tab  

       If tabControl1 = tabControl1.Pages.Count - 1 Then

            tabControl1 = tabControl1 - (tabControl1.Pages.Count - 1)

	 else

		tabControl1=tabControl1+1

	 endif



Here is the way I move to the previous/last tab



	' If this is the first tag move to the last tab _

		otherwise move to the previous tab

	if tabControl1=0 then

        	tabControl1 = tabControl1.Pages.Count - 1

	else

		tabControl1 = tabControl1 - 1

	endif



John Ruff - The Eternal Optimist :-)







-----Original Message-----

From: Noel Wilson [mailto:nwilson4@t...] 

Sent: Wednesday, December 19, 2001 5:54 PM

To: Access

Subject: [access] macro and tab controls





How do I write an event macro to go to another page in a tab control.  

goto page wont work on this type of form.   











  Return to Index