472,133 Members | 1,054 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,133 software developers and data experts.

drop down list fill in a form

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
1 1391
167 100+
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.

Similar topics

1 post views Thread by Richard Galli | last post: by
reply views Thread by owyn | last post: by
2 posts views Thread by ramesh | last post: by
reply views Thread by Giulio Santorini | last post: by
3 posts views Thread by Stephen Adam | last post: by
3 posts views Thread by pmud | last post: by
1 post views Thread by csgraham74 | last post: by
2 posts views Thread by kalaivanan | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.