If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
I'm a noooby
I have 2 tables in access and I need to have a form that adds a record
to one table. With the auto form feature, it seems easy enough. However, I need to get to have a drop down / combo box on the form that lists all the company names with the ID from the 2nd table. So, when someone fills in the form for the orders table, they have to select a company from the companies table to assign the order to. Is there an easy way to do this? Thanks. |
#2
|
|||
|
|||
"cakewalkr7" wrote in
message I have 2 tables in access and I need to have a form that adds a record to one table. With the auto form feature, it seems easy enough. However, I need to get to have a drop down / combo box on the form that lists all the company names with the ID from the 2nd table. So, when someone fills in the form for the orders table, they have to select a company from the companies table to assign the order to. Is there an easy way to do this? Thanks. Sure. Create the first form. I'll assume that the form is not automatically created with a combo box to represent the CompanyID field. So, with that form open in design view, delete the text box that was put there for CompanyID. Make sure sure that the control wizards are turned on -- the little "magic wand" button near the top of the toolbox should be "pushed in" -- click the combo box tool from the tool box and then click the place on your form where you want the combo box to go. No need to be too precise about this, you can (and probably will) fix up the size and position later. The combo box wizard will start and take you through the steps to create the combo box. You should tell it "I want the combo box to look up values in a table or query", then tell it which table you want it to get them from (your second table), then choose both the company name and the company ID fields. Let it hide the ID column, and tell it to store the value in the the appropriate field in your first table (the form's record source). Tell the wizard how you want the combo box to be labelled, and Bob is, if not your uncle, at least a very near relative. -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
Thread Tools | |
Display Modes | |
|
|