Hi there, this question has probably being asked many times, but it has got me stuck.
I have a table for customers that includes a control for the area that they reside in.
There is also a table for contractors that shows the areas they work in. A table called tblArea has the only two options, "North" and "South" which is linked to the customer and contractor table. The customer can only select one option but the contractor can be "North", "South" or both. This is done by ticking the tick boxes in the drop down list (combo box).
All this is on a form with a subform (subJobsTable).
When the user enters the customer detail on the mainform and selects the area for the customer, I need the list of contractors (on the subform) restricted to those that work in the are of the customer.
I have the following code in the After_update event of the area control on the main form:
Dim sContracorSource As String
sContractorSource = "SELECT [ContractorDetail].[businessID],[ContractorDetail].[Area.value],[ContractorDetail].[BusinessName] " & _
"FROM ContractorDetail " & _
"WHERE [ContractorDetail].[Area.value] = " & Me.Area
Me.subJobsTable.Form.Contractor.RowSource = sContractorSource
With this setup I am getting the following error:
"Invalid bracketing of name '[ContractorDetail].[Area.Value]'"
Am I missing something obvious here?
Thanks for your help.
David