Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 08-10-2007, 07:28 AM   #1
ted.martin
Newly Registered User
 
ted.martin's Avatar
 
Join Date: Sep 2004
Location: Bolton, U.K.
Posts: 735
Thanks: 4
Thanked 23 Times in 21 Posts
ted.martin is on a distinguished road
Open a Form at a particular Tab Control Page

Does anyone know of the way to Open a Form so that it opens at (say) page 3 of the tab control.

I thought about a flag variable on the forms Load event but the SetFocus code does not help as the form still opens with Page 1.

If strFlag = "Page3" Then
Me.Page3.SetFocus
End If

Thank you.

ted.martin is offline   Reply With Quote
Old 08-10-2007, 08:52 AM   #2
boblarson
Smeghead
 
boblarson's Avatar
 
Join Date: Jan 2001
Location: Oregon, USA
Posts: 32,068
Thanks: 97
Thanked 1,827 Times in 1,578 Posts
boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold
In the form load event you can put:
Code:
Me.YourTabControlName.Pages(n).SetFocus
where n is the page number (zero based) and YourTabControlName is the name of the tab control, not the page name.

You can also use the page name, if you prefer, by using:
Code:
Me.YourTabControlName.Pages("YourPageNameHere").SetFocus
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
boblarson is offline   Reply With Quote
Old 08-13-2007, 01:12 AM   #3
ted.martin
Newly Registered User
 
ted.martin's Avatar
 
Join Date: Sep 2004
Location: Bolton, U.K.
Posts: 735
Thanks: 4
Thanked 23 Times in 21 Posts
ted.martin is on a distinguished road
Thanks Bob. Much appreciated.

ted.martin is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Am I missing Something - Tab Stop on Tab Control Form melanie Forms 4 03-15-2007 04:21 PM
Using tab control in a multi-page form timmurphy Forms 1 08-24-2006 10:58 AM
Sub Form In Tab Control Horror CJBIRKIN Forms 2 09-03-2002 05:04 AM
Form shifts when using tab control AnnPhil Forms 1 05-22-2002 06:56 PM
Data entry on Form with Tab Control Judy Forms 2 08-06-2001 04:28 AM




All times are GMT -8. The time now is 09:11 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World