updating two fields from a combo box?????????

paulmcdonnell

Ready to Help
Local time
Today, 08:36
Joined
Apr 11, 2001
Messages
167
hi guys

Question: I use a combo box to display names and addresses of companies (list is 5 columns wide). The combo box updates a field on the after update event. I want this combo to update more than one field after the update event ie name and address. How do you get a combo box two update two fields from multiple columns in the dropdown list?????????????????

Hope you can help

Cheers
Paul
 
The first column in ComboBox1 is your NameID field, the second is StreetName, the third is City.

Your form is based off of the table you want to store this new information in.

AfterUpdate event on ComboBox1, you update your form as follows:

Me.[TableField1]=ComboBox1.Column(1)
Me.[TableField2]=ComboBox1.Column(2)
Me.[TableField3]=ComboBox1.Column(3)

etc.

A new trick I learned on the forum. Glad to share.

Note: The columns in the combo start with zero. then one, two, three, etc.
 

Users who are viewing this thread

Back
Top Bottom