473,320 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Navigating a Tab Control


I have a tab control with 3 pages. I am on page 2 of the Tab
Control, and I am trying to set the focus to the 1st combo box on
that page.

I have this so far:

Me.cboMOI2.SetFocus

but, instead it sets the focus to cboMOI1 which is on page 1 of the
Tab Control.

I also tried

Me.pgStartDate.cboMOI2.SetFocus

but that didn't work either.

Any ideas on how to solve this issue?
Marcus
******

Nov 13 '05 #1
1 1577
these both worked... between the two, you should be able to sort it
out.

Private Sub Command19_Click()
'--just returns some inane thing like
' cboName=Dog
'--in a message box

Dim strMsg As String
strMsg = Me.TabCtl0.Pages(2).Controls(0).Name & "=" &
Me.TabCtl0.Pages(2).Controls(0).Value
MsgBox strMsg
End Sub

Private Sub Command20_Click()
Me.TabCtl0.Pages(2).Controls(0).SetFocus
End Sub

so you should be able to use
Me.TabCtl0.Pages(2).Controls("ControlName").SetFoc us

just as well. Just modify to suit your needs.

One other fun thing - the tab controls don't act like real containers
(like a subform does), so you can't have two controls on the same tab
control but on different pages... (Was wondering why I couldn't
specify a tab number of anything when I was in the QBE!)

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Danny J. Lesandrini | last post by:
The following code works with a standard MDB to navigate to a particluar record (with a DAO recordset, of course) but it's giving me problems in an ADP I'm working on. Dim rs As ADODB.Recordset...
2
by: Daveyman | last post by:
Hi, I'm having a problem navigating to/from a subweb using forms authentication. The setup in IIS is as follows: TestSite +----SecureDir +----ReportsSubWeb In VS.Net 2003 this has been...
5
by: Roy Lawson | last post by:
I am having no problems connecting to a DB, creating a DataAdapter, and creating a dataset...and connecting to the data. Using the builtin data objects to do all this. My only problem now is...
1
by: ABC | last post by:
Can I find out when the user is navigating to another page? or What events will be call if the page is change to another page? I want to call clear session variables when user is navigating to...
7
by: hiriumi | last post by:
Hello folks, I have a web application that has basic authentication turned on (IIS). What I would like to accomplish is detect whether user is navigating away from the site or simply going to the...
1
by: JohnMOsborn | last post by:
I am designing an Access database that will use tab controls. Normally, you place different sets of fields on each page of the tab control – like Fields1-3 on Page 1, Fields 4-6 on Page 2, etc. In...
0
by: in10se | last post by:
I have a .NET 2.0 application that uses the WebBrowser control. Because all of my pages are generated dynamically, I am catching the Navigating event, cancelling it, and performing my own operations...
2
by: DanAusitn | last post by:
Good morning people, i have made a program which handles & manages stock. to navigate through the records i have assigned command buttons to control the data control, however in some of the catagorys...
2
tuxalot
by: tuxalot | last post by:
Strange occurrence and I've looked everywhere and can't seem to find any explanation. Using A07, when I navigate records using the built-in buttons, the text in my labels darkens increasingly while...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.