K
kpick4 via AccessMonster.com
The following code from a subform control returns the proper value:
Private Sub PRODUCT_Change()
Text33 = DLookup(DESCRIPTION, "products", "Product=' & PRODUCT'")
End Sub
But, instead of putting it in the text box on my form it returns it as:
Runtime error 2741: The expression you entered as the query parameter
produced this error: 'SCOONER'. SCOONER is the correct return value for the
parameter ('G 50') passed into DLookup.
I have tried various other parameter values and the error message always
contains the correct return value, although the Runtime error code is
sometimes like '3075: Syntax error(missing operator) in query expression
HORIZ. CURVED FRAME'. HORIZ. CURVED FRAME is the correct return value in
that example.
Can anyone tell me why DLookup is interpreting the return value as being the
parameter value?
Private Sub PRODUCT_Change()
Text33 = DLookup(DESCRIPTION, "products", "Product=' & PRODUCT'")
End Sub
But, instead of putting it in the text box on my form it returns it as:
Runtime error 2741: The expression you entered as the query parameter
produced this error: 'SCOONER'. SCOONER is the correct return value for the
parameter ('G 50') passed into DLookup.
I have tried various other parameter values and the error message always
contains the correct return value, although the Runtime error code is
sometimes like '3075: Syntax error(missing operator) in query expression
HORIZ. CURVED FRAME'. HORIZ. CURVED FRAME is the correct return value in
that example.
Can anyone tell me why DLookup is interpreting the return value as being the
parameter value?