Tabs Revisited - A97

K

Kahuna

Hi Folks been here before - but still looking. How do I change the page
focus on a tab control?

[TabCtl84] - Page Index 0 default shown on load.

I'd like to change the focus to a different page dependant on a variable.

So here's how I think it should look (but obviously doesn't work):

If Me![TabCtl84].Value = 0 Then
Me![TabCtl84].[Page86].SetFocus
End If

Scoured the help and cant get the syntax to set the focus. I don't want to
change the layout of the tabs so don't want to reindex them!

Suggestions appreciated.
 
K

Kahuna

What a Star Douglas - both work!

Cheers my friend.

--
Kahuna
------------
Douglas J. Steele said:
It's either

Me.TabCtl84.Pages("Page86").SetFocus

or

Me.Page86.SetFocus



--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Kahuna said:
Hi Folks been here before - but still looking. How do I change the page
focus on a tab control?

[TabCtl84] - Page Index 0 default shown on load.

I'd like to change the focus to a different page dependant on a variable.

So here's how I think it should look (but obviously doesn't work):

If Me![TabCtl84].Value = 0 Then
Me![TabCtl84].[Page86].SetFocus
End If

Scoured the help and cant get the syntax to set the focus. I don't want
to change the layout of the tabs so don't want to reindex them!

Suggestions appreciated.
 

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