referencing a page on tab control

S

stumpy

This may seem an easy question but how do I open a form,opening it on a
perticular tab. Ive got as far as:-

Dim stdocName As String
Dim stLinkCriteria As String
stDocname="ArchiveForms"
DoCmd.OpenForm stdocName,,,stLinkCriteria

On the form I have Tabctl1 with pages 1,2,3,I am trying to open the form
onto page2 to show list1

Any help is greatly appreciated
 
S

Stuart McCall

stumpy said:
This may seem an easy question but how do I open a form,opening it on a
perticular tab. Ive got as far as:-

Dim stdocName As String
Dim stLinkCriteria As String
stDocname="ArchiveForms"
DoCmd.OpenForm stdocName,,,stLinkCriteria

On the form I have Tabctl1 with pages 1,2,3,I am trying to open the form
onto page2 to show list1

Any help is greatly appreciated

Setting focus to the first item in a page's tab order will display that
page, so:

Forms(stdocName)!list1.SetFocus

ought to do it.
 
S

stumpy

Thanks Stuart,works a treat

Stuart McCall said:
Setting focus to the first item in a page's tab order will display that
page, so:

Forms(stdocName)!list1.SetFocus

ought to do it.
 

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