Combo Box Query

M

Michael

I think this is easy but I looked on the MS website and the newsgroup and
couldn't find anything. I have a query with two tables ("bills", "paybills")
that have a relationship of 1 - many respective. I want to use a combo box
that looks up field "A" in the "paybills" table and based upon that I want to
populate another field in the query with a field from "bills". So if
"American Express" is picked from the combo box of the query in Field 1, I
want Field 2 in the query to pick up the Date from the "bills" table. Thanks
Michael
 
M

Marshall Barton

Michael said:
I think this is easy but I looked on the MS website and the newsgroup and
couldn't find anything. I have a query with two tables ("bills", "paybills")
that have a relationship of 1 - many respective. I want to use a combo box
that looks up field "A" in the "paybills" table and based upon that I want to
populate another field in the query with a field from "bills". So if
"American Express" is picked from the combo box of the query in Field 1, I
want Field 2 in the query to pick up the Date from the "bills" table.


I think this is all you need:

SELECT paybills.A, bills.[Date]
FROM bills Left Join paybills
ON bills.primarykeyfield = paybills.foreignkeyfield
 

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