2 salesmen for 1 project

S

steve

I have 2 tables set up, tblProjects and tblSalesmen.
Each project will have 2 (and only 2) salesmen.
On frmProjects, I have 2 comboboxes, Salesman1 and Salesman2. The
comboboxes have 2 columns, but I set the width = 0 for the first column. The
first column is bound, so I am storing the primary key of each in tblProjects.

I want to create a query that shows the ProjectName, first name of
Salesman1, and first name of Salesman2. I can only get my query to show the
primary key of the salesmen, and not the first name. How do I do this?

thanks,
Steve

Thanks,
Steve
 
K

KARL DEWEY

Add the tblSalesmen table to your query twice and left join from tblProjects.
The join is from Salesman1 field to primary key of tblSalesmen and from
Salesman2 field to primary key of tblSalesmen_1 (Access add a suffix when you
have the table twice). Then use FirstName from each of the tblSalesmen and
label Salesman_1 and Salesman_2.
 
S

steve

Karl,

THANK YOU! This was driving me crazy, but you explained everything
perfectly.

When you say "label" are you referring to the alias? Are there any
pitfalls of using this function?

Thanks again,
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top