B
Brian Goodheim
Trying to use a combo box lookup field in a primary table to select contact
personnel in a secondary table. The lookup field is supposed to return only
personnel working for the clientID of the active datasheet record, but
instead the combo box is populated with personnel form every client. When I
enter an ASCII constant or parameter as criterea, the query works fine. But
I can't get just the current client's contacts to display by entering the
field name as criterea. The SQL looks like this:
SELECT Reps.REPID, Reps.[rep-ln], Reps.CLIID
FROM Reps
WHERE (((Reps.CLIID)=[Assignments].[ClientID]))
ORDER BY Reps.[rep-ln];
I've come to the conclusion that Access can't use field names in the primary
table as variable criterea passed to the query. Am I wrong?
Thanks.
-Brian
personnel in a secondary table. The lookup field is supposed to return only
personnel working for the clientID of the active datasheet record, but
instead the combo box is populated with personnel form every client. When I
enter an ASCII constant or parameter as criterea, the query works fine. But
I can't get just the current client's contacts to display by entering the
field name as criterea. The SQL looks like this:
SELECT Reps.REPID, Reps.[rep-ln], Reps.CLIID
FROM Reps
WHERE (((Reps.CLIID)=[Assignments].[ClientID]))
ORDER BY Reps.[rep-ln];
I've come to the conclusion that Access can't use field names in the primary
table as variable criterea passed to the query. Am I wrong?
Thanks.
-Brian