View Full Version : Probably an easy one for you guys


TClark14
10-08-2001, 05:29 PM
I have a table that contains a rig name and a rig code. The rig code is only used for sorting because I am not sorting the rigs by name (I don't want them alpha, I need them to come out in a certain order, so I assigned rig codes). Is there a way within a form, that if I select a rig name from a a list in a combo box that it will automatically bring in the rig code in a text box displayed?

Thanks
Terry

Jack Cowley
10-08-2001, 05:49 PM
Assuming that the rig number is in the first column in your combo box then this code in the After Update event of the combo box should work for you:

Me.TextBoxName = Me.ComboBoxName.Column(0)

If, on the other hand, you want the combo box to find a specific rig number on your form then create the combo box using the Wizard and on the first screen of the Wizard choose the third item, "Find a record....". Then follow the rest of the Wizards screens.