Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Label Text 1

Status
Not open for further replies.

Dilly

Technical User
May 28, 2001
41
GB
I have created a form and in the form there is a combo box for selection of either number 1 or number 2. I want to create a label or text box that will be filled in by the selection of one of the numbers.

I want it to put text "UK" for the number 1 and "Overseas" for the number 2.
 
I assume that your combo box looks like this:
Code:
1 | UK
2 | Overseas
In the After Update property of your combo box enter this code:
Code:
Private Sub cboUKorO_AfterUpdate()
    Me.txtUKorO = Me.cboUKorO.Column(1)
End Sub
"txtUKorO" is the text box you want the choice to appear in. "cboUKorO" is the combo box in which the choice is made.

"Column(1)" if "UK" and "Overseas" appear in the second column of your combo box. Count starts from left to right at "0".

I hope this works for you.
:) Gus Brunston
An old PICKer
padregus@home.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top