Hello,
I have a form I designed where it shows a company Code and company name then has a combobox which shows a list of locationCodes. When I select one it then loads up the address and contact details below.
I have 3 tables involved Customers, Locations and Contacts, the form is linked to the Customers table so it loads up showing the first customer in the table and I can change the record to go to the next customer etc. I have a query that selects the locationCode from location table where the customerCode matches the current records CustomerCode, I get this from the value of the textbox on the form.
So the criteria in the query is the Locations tables customerCode when it is equal to [Forms]![Customers]![Customer Code]
The combo box then uses this query to populate the available locations for that company
This all works perfectly but I am now trying to combine this Form with another form and access them via a Navigation Form.
When I add the Customer Form as one of the pages on the Navigation Form, it suddenly has trouble with the part where I access the value of the text box on the Customer Form in the query. ie [Forms]![Customers]![Customer Code]
Do I need to refer to this control a different way now as the Customer Form is a subform to the Navigation form? or is it due to the database running the query as Navigation Form loads and the text box on the subform hasn't loaded yet?
When I navigate to the customer form is prompts me to enter the customerCode.
Any help would be most appreciated.
Thanks.
Regards,
WildmanUK
I have a form I designed where it shows a company Code and company name then has a combobox which shows a list of locationCodes. When I select one it then loads up the address and contact details below.
I have 3 tables involved Customers, Locations and Contacts, the form is linked to the Customers table so it loads up showing the first customer in the table and I can change the record to go to the next customer etc. I have a query that selects the locationCode from location table where the customerCode matches the current records CustomerCode, I get this from the value of the textbox on the form.
So the criteria in the query is the Locations tables customerCode when it is equal to [Forms]![Customers]![Customer Code]
The combo box then uses this query to populate the available locations for that company
This all works perfectly but I am now trying to combine this Form with another form and access them via a Navigation Form.
When I add the Customer Form as one of the pages on the Navigation Form, it suddenly has trouble with the part where I access the value of the text box on the Customer Form in the query. ie [Forms]![Customers]![Customer Code]
Do I need to refer to this control a different way now as the Customer Form is a subform to the Navigation form? or is it due to the database running the query as Navigation Form loads and the text box on the subform hasn't loaded yet?
When I navigate to the customer form is prompts me to enter the customerCode.
Any help would be most appreciated.
Thanks.
Regards,
WildmanUK