Question Combo Box referencing one table, inputting value from different table

jbrod812

New member
Local time
Today, 23:36
Joined
Jul 9, 2013
Messages
9
I am trying to use a combo box to select the Company in an input record form for my Transactions. In the Transaction table, each record contains the Company ID, but not the company name (I have a relationship with a Company ID primary key in a separate table that has all the companies information). I would like to be able to select the proper company in the combo box and have the form save the value as the Company ID number with the rest of the input data in a record (it will then refer to the correct company name in the other table if I query it because of the ID key). Help!!
 
Here's a picture of the relationship:
 

Attachments

  • Relationships.PNG
    Relationships.PNG
    21.4 KB · Views: 153
So what exactly is the issue? Why do you want the company name stored anywhere but in the company table?
You have a query as the rowsource of the combo. Te query would contain the CompanyId and the company name. You would only display the company name,Once you select the company, by name, the companyId is available for use in other locations/processes.

You may get more insight from this free video tutorial
http://www.datapigtechnologies.com/flashfiles/combobox1.html
 
I understand how to get the combo box and how to refer to another data point. It just when selecting the row value that I desire, I would just like to be able to input it into the record that I am adding.

Example:

Date
Invoice Number
Security Name
CompanyID
Deductions

I just type in each of the values for these, as they already refer to the Transactions table that I have, and when I save the form, the record is added. The combo box for the CompanyID looks up CompanyID, or CompanyID and Company name attached to it, and will not add the value for the ID to my record that I am creating. This is what I desire to do.

I am almost complete with the database, so I'm extremely desperate to get this correct. Thank you for your continuing assistance. It means the world.

Thanks,
J
 

Users who are viewing this thread

Back
Top Bottom