Linking information

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top