I am going crazy trying to sort out what should be a very straightforward reference to a field on a sub-form. There is an
error in the WHERE clause of my query but I can't figure it out.
The hierarchy of my data is as follows:
Trips -> Activities -> Contacts
I have a main form called f_MainTripForm. On this Main form I have a sub-form called f_ActivityDetails where the user selects
the Company they are visiting from a drop-down named Company_DD with a control source of Company_Listing_ID
The f_ActivityDetails sub-form has a tab control in which I have a sub-sub form named f_OtherFirmContacts on one of the
-> f_ActivityDetails joined on Trip_ID
->-> f_OtherFirmContacts joined on Activity_ID
In f_OtherFirmContacts I have a dropdown named SelectContact_DD that should select only the contacts that have a Company_ID =
to the Listing_ID stored in the Company_DD drop-down in f_ActivityDetails.
I have this code for the SelectContact_DD drop down:
When I open the form, I get a request to Enter Parameter Value.
When I create an unbound field in f_Contacts with the Control Source
I get a #Name error.
When I manually enter the COMPANY_ID in the Parameter Value request, all works fine.
Thanks for any suggestions - I am sure it is something simple to do with the syntax of the WHERE clause.