OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Populating a list box from another table

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
rdischer
Newbie
Newbie


Joined: 18 Mar 2008
Posts: 1

PostPosted: Fri Mar 21, 2008 4:50 pm    Post subject: Populating a list box from another table Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group