The point is why have tblRecords.LockID at all?
Couldn't you just have a simple query like:
PARAMETERS SpecifiedRecordID Long;
SELECT
R.*,
IIf(Nz(Q.Outstanding,0)>0, -1, 0) AS LockID
FROM tblRecords R
LEFT JOIN qryOutstanding Q
ON R.RecordID = Q.RecordID
WHERE R.RecordID =...