Combo Box Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
Back
Top