Hi,
I have a simple, unbound form which has a combo box containing manufacturers, and a text box which I want to display the relevant country when a user selects a manufacturer.
I have tried the following code in the combo box's afterupdate event:
Dim c As String
c = DLookup("[Country]", "Manufacturers", "[Manufacturer] = " & Forms![man-cntry]![man])
Forms![man-cntry]![cntry] = c
When I change the manufacturer, I get a 64479 runtime error which tells me:
"The expression you entered as a query parameter produced this error: 'The object doesn't contain the Automation object '[whatever manufacturer is selected]."
This is driving me nuts, can anybody help?
Thanks,
Paul
I have a simple, unbound form which has a combo box containing manufacturers, and a text box which I want to display the relevant country when a user selects a manufacturer.
I have tried the following code in the combo box's afterupdate event:
Dim c As String
c = DLookup("[Country]", "Manufacturers", "[Manufacturer] = " & Forms![man-cntry]![man])
Forms![man-cntry]![cntry] = c
When I change the manufacturer, I get a 64479 runtime error which tells me:
"The expression you entered as a query parameter produced this error: 'The object doesn't contain the Automation object '[whatever manufacturer is selected]."
This is driving me nuts, can anybody help?
Thanks,
Paul