By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,292 Members | 1,405 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,292 IT Pros & Developers. It's quick & easy.

drop down list fill in a form

P: 20
I have two tables, one called customers and the other called products. I would like to create a form called orders.

On here what i would like to do, is a drop down list for the customer ID. When the customer ID is selected the rest of the fields get filled in with the correct details. So their firstname, lastname, address etc get put into the fields.

Same for products as well.

How do i do this?
Sep 7 '07 #1
Share this Question
Share on Google+
1 Reply

P: 167
hi there!

You should make a query that contains all the info you want to be filled in automatically i.e. (CustomerID, Fname, Lname...)
Open combobox's property list:
-Set Bound column property to: 1
-set Column count property to: 3 (or the number of fields in your query)
-set Column widths to: 5;0;0 (only first column will be displayed-5cm, and the other two will not be displayed, but they will be present though)

In combobox's after update event property write code like this:


note that 1st column has index 0, 2nd has index 1 (Fname)...

For more info you can search the Column property in Microsoft Visial basic help!

Best, H.
Dec 11 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.