By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,871 Members | 2,337 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,871 IT Pros & Developers. It's quick & easy.

Code for activate tab on a form when a item is selected from a list

P: 4
I have a Form with a combo list called "Type" there is a 4 items on this list. I have also 4 different tabs (exactly named as my 4 itemes on the combo list) on the same form.
I want when any of these itemes on the combolist (Type) is selected, goes to the same tab on the form which has some fileds that have to be filled by user.

where and how to code it. if anyone could help me what the code has to be I appreciate it.
Aug 28 '08 #1
Share this Question
Share on Google+
2 Replies


missinglinq
Expert 2.5K+
P: 3,532
I have to ask: If the four items in the combobox are the names of the four tabbed pages, why would you want to add the extra step of using the combobox to select the tabbed page, as opposed to the user simply clicking on the tabbed page?

Linq ;0)>
Aug 28 '08 #2

missinglinq
Expert 2.5K+
P: 3,532
When you place tabbed pages on a form, the are placed in a zero-based index. The first page = 0, the second = 1 and so forth. In this example, the 1st page is named "Red" the 2nd is "White" and the 3rd is "Blue"

Expand|Select|Wrap|Line Numbers
  1. Private Sub YourCombo_AfterUpdate()
  2.  
  3. Select Case YourCombo
  4.  Case "Red"
  5.    Me.YourTabs = 0
  6.  Case "White"
  7.    Me.YourTabs = 1
  8.  Case "Blue"
  9.    Me.YourTabs = 2
  10.  End Select
  11.  
  12. End Sub
Linq ;0)>
Aug 29 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.