Visible Column

mlopes1

Registered User.
Local time
Today, 05:02
Joined
Sep 4, 2002
Messages
76
I will try to explain this clearly because sometimes it confuses even me:

I have a company table that has two columns, CoID(pk) and Company Name.

On MainForm I have a combo box where a user will select a company. I make the Company name what is visible and what a user selects, but the Selected Table, actually saves the CoID, this is the Bound Column. I have done this so that in a seperate form, in my VB I can use If statements referring to the number rather than whole name. On this same form, a user selects what product the company purchased.

Now, I would like to create a form/report where the user can view all the companies that have purchased a particular product. However, when I set up a field to show this, it of course returns just the CoID from the selected table. So the user sees "Product X sold to companies 1, 23, 45". To them, this is meaningless.

How can I revert back to the name of the company when displaying the information? Should I save the name AND ID in the selected table, and if so, does that mean specifying multiple Bound Columns? Thank you as always for your help...

Marco
 
No, you should not store the company name column in the order table.

Create a query that joins the two tables on CoID. You can then select columns from both tables. Use this query as the recordsource for the form.
 

Users who are viewing this thread

Back
Top Bottom