Form combo box question

illy2k

Registered User.
Local time
Today, 11:30
Joined
Apr 21, 2003
Messages
51
On a form I have a combo box with three columns. The three columns are as folows; the bound column is the driverID, and the next column's are driver first name and driver last name respectively. When someone selects something from the combo box, I wanted the driver ID of that driver selected to be stuffed into a text box on the form. I had this:

Private Sub DriverName_Exit(Cancel As Integer)
Me!DriverID = Me!DriverName
End Sub

But after you leave the box nothing happens in the DriverID text box.

Is there anyway to stuff the driverID bound column of the combo box into a text box on the form?
 
If your bound column is [DriverID] for your combobox then that is the value that is being stored in that field (even though it may be hidden). Why do you want that value to be duplicated in another text box?
 
illy2k,

What you need is to use the AfterUpdate event of
your combo:

Me.SomeTextBox = Me.YourCombo.Column(2)

The index for the .Column runs starts at 0.

Wayne
 

Users who are viewing this thread

Back
Top Bottom