Record doesn't display in combo

P

Peter Stone

Novice, Access 2003, XP Pro

I have a subform (default view single form) containing a combo. The combo
uses a query to select values into a linking table.

The query displays perfectly correctly in Datasheet view, but when there is
an excluded record from tblDest (e.g. with GeogID = 2 (see the WHERE
statement below)), a blank appears in the combo. The correct record is there,
but I have to scroll in the combo with my mouse wheel to view it.

How can I fix this? Do I need to modify the SQL, my db design, or the combo?

There are 4 tables shown on the grid: tblName; tjnNameDest; tblDest;
tjnGeogDest the two tables prefixed tjn create many-to-many relationships.

SELECT tblDest.DestID, tblName.Name, tblName.NmTypeID, tjnDestGeog.GeogID
FROM (tblDest INNER JOIN tjnDestGeog ON tblDest.DestID = tjnDestGeog.DestID)
INNER JOIN (tblName INNER JOIN tjnDestNm ON tblName.NameID =
tjnDestNm.NameID) ON tblDest.DestID = tjnDestNm.DestID
WHERE (((tblName.NmTypeID)=1) AND ((tjnDestGeog.GeogID)=4 Or
(tjnDestGeog.GeogID)=5))
ORDER BY tblName.Name;

Thanks
 
P

Peter Stone

I solved it myself. The query I used on the combo was correct, but the query
that joined the subform to the main form wasn't rigorous enough.
 

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