Linking information

V

Very Basic User

Hello,

I have a database with two tables. Currently I have the form looking in the
second table "Customer # and Name" to lookup the customer #. you then need to
type the customer name in the next field on teh form. What I would like to
happen is that when I select the drop down arrow on cust #, I can see the #
and name to make my selection from. Then when I do select one, both fields
are automatically populated. Any help would be appreciated!
 
D

Douglas J. Steele

In the AfterUpdate event of the combo box, put code like:

Private Sub MyCombobox_AfterUpdate()

Me.MyTextbox = Me.MyCombobox.Column(1)

End Sub

That assumes that you're okay with whatever's in the first column of the
selected row of the combo box just being visible in the combo box: it puts
whatever's in the second column into a text box named MyTextbox. (The Column
collection starts numbering at 0)
 
Top