I’ve been trying to restrict data in a list box using the following sql statment entered in the row source property for the list box
SELECT DISTINCTROW Contacts.ContactID, [Firstname] & “, ” & [Lastname] AS FirstN, Contacts.WorkPhone
FROM Contacts
WHERE (((Contacts.School)=[forms]![frmschools]![me]![school_id]) AND ((Contacts.[Contact Status])=’AC – ACTIVE’));
Basically I want to restrict the contacts show in the list box to that of the school currently accessed on the form. The above code works in SQL view as it manually prompts me for the school id. However it doesn’t work on the form, i.e its not picking up the school id on the currectly accessed record.
Any ideas on what I’m doing wrong?
Thanks
Anthony Sargent