I need a little help writing a combo box query.
On my form is a combobox which is to draw its records from two tables. In
the primary table, TableA there are two columns, tblAID & tblAName. In the
second table, TableB there are multiple records for some of the tblAID
records, plus there are many TableA records that have no records in TableB.
The two tables are joined by tblAID in a one to many relationship (as
below):
TableA TableB
tblAID-(1)------| tblBID
tblAName |---(Many)-tblAID
tblBCost
What I want is for the combo box to show every record in TableB as:
tblAID, tblAName, tblBCost
And every other record in TableA as:
tblAID, tblAName, (tblBCost would be null)
I can write the query to get all of the records from TableA or TableB, but
whenever I put both tables in the same query I get only the records from
TableB.
On my form is a combobox which is to draw its records from two tables. In
the primary table, TableA there are two columns, tblAID & tblAName. In the
second table, TableB there are multiple records for some of the tblAID
records, plus there are many TableA records that have no records in TableB.
The two tables are joined by tblAID in a one to many relationship (as
below):
TableA TableB
tblAID-(1)------| tblBID
tblAName |---(Many)-tblAID
tblBCost
What I want is for the combo box to show every record in TableB as:
tblAID, tblAName, tblBCost
And every other record in TableA as:
tblAID, tblAName, (tblBCost would be null)
I can write the query to get all of the records from TableA or TableB, but
whenever I put both tables in the same query I get only the records from
TableB.
Comment