Fill text box based on combo box (no using columns in combo box!)

SirStevie3

Registered User.
Local time
Today, 00:50
Joined
Jul 29, 2013
Messages
58
Hey all,

I'm looking for a way to have a text box auto fill based on the selection of a combo box on the same form. I cannot use the method i find all over the internet of using multiple columns in the combo box and basing the text box on that because the combo box already has multiple columns being used to determine its own possibilities and other combo box possibilities.

I would really just like the text box to work like this, but im still kinda inexperienced in VBA...

If combo box is "F004-001", then text box is "237"
If combo box is "F004-003", then text box is "280"

I know how to add in an "after update" thing, but i do not know how to do If/then statements.

Thanks for any help!
 
Try this.
If Me.YourComboBox = "F004-001" Then
Me.YourTextBox = 237
ElseIf Me.YourComboBox = "F004-003" Then
Me.YourTextBox = 280
End If

HTH
 

Users who are viewing this thread

Back
Top Bottom