R
Robert
I'm trying to update the choices in a combo box based on the value of another
field field on the same form (actually a subform).
With the form open (and some record selected), the first time I open the
query, it executes correctly.
ProductMaterial is a subset of ProductName. The ProductMaterial combo box
should update any time ProductName changes. I've set the On Change event
(and tried various other events) of ProductName to =[qryDistinctMaterials].
qryDistinctMaterials is:
SELECT DISTINCT tblProducts.PrimaryMaterial
FROM tblProducts
WHERE
(((tblProducts.ProductName)=[forms]![tblInvoiceLinessubform].[ProductName]));
With the form in datasheet view, every time I select a different
ProductName, I get the information message:
The expression On xxx you entered as the event property setting produced the
following error: The object doen't contain the Automation object
"qryDistinctMaterials."
and qryDistinctMaterials fails to execute. If I open qryDistinctMaterials,
or toggle from design to datasheet views, it works OK.
Finally, when I open the main form, I get the caution:
"This expression is typed incorrectly, ir it is too complex to be evaluated.
For example, a numeric expression may contain too many complicated elements.
Try simplifying the expression by assigning parts of the expression to
variables."
Help - what have I failed to do?
Thanks, Robert
field field on the same form (actually a subform).
With the form open (and some record selected), the first time I open the
query, it executes correctly.
ProductMaterial is a subset of ProductName. The ProductMaterial combo box
should update any time ProductName changes. I've set the On Change event
(and tried various other events) of ProductName to =[qryDistinctMaterials].
qryDistinctMaterials is:
SELECT DISTINCT tblProducts.PrimaryMaterial
FROM tblProducts
WHERE
(((tblProducts.ProductName)=[forms]![tblInvoiceLinessubform].[ProductName]));
With the form in datasheet view, every time I select a different
ProductName, I get the information message:
The expression On xxx you entered as the event property setting produced the
following error: The object doen't contain the Automation object
"qryDistinctMaterials."
and qryDistinctMaterials fails to execute. If I open qryDistinctMaterials,
or toggle from design to datasheet views, it works OK.
Finally, when I open the main form, I get the caution:
"This expression is typed incorrectly, ir it is too complex to be evaluated.
For example, a numeric expression may contain too many complicated elements.
Try simplifying the expression by assigning parts of the expression to
variables."
Help - what have I failed to do?
Thanks, Robert