rdischer Newbie

Joined: 18 Mar 2008 Posts: 1
|
Posted: Fri Mar 21, 2008 4:50 pm Post subject: Populating a list box from another table |
|
|
This issue may have already been dealt with, but I'm not sure what to search for to find a solution.
I have a number of tables in my database, among them a Products table and a Vendors table with information about who I can get products from. To simplify things, let's say that the Vendors table contains two fields, VendorID and VendorName, with VendorID being an integer primary key. Again, to simplify, let's say that the Products table has two fields, ProductName and VendID, which is to contain the primary key of the vendor that I can get that product from. I am trying to set up a form to enter the products. I would like the form to have a list box which will have all of the VendorName values in it and when I save the product record, I want it to use the value selected in the list box to get the VendorID for that vendor and put that into VendID. How do I populate the list box with the Vendors.VendorName values and then use the selected value to get Vendors.VendorID to fill in VendID?
Thanks,
Bob |
|