Dlookup using sub forms

RevJeff

Registered User.
Local time
Today, 17:08
Joined
Sep 18, 2002
Messages
129
I'm trying to set the value of the "Title" field on "SubForm1" to the value of the "Title" field in "Table1" where the "Code" field in "Table1" equals the "Code" field of "SubForm1"

Can someone please tell me what I'm doing wrong?

TITLE = DLookup("[TITLE]", "Table1", "
Code:
 = Forms![Form1]![SubForm1]![CODE]")


The error message I get says:  "The Object doesn't contain the Automation object 'Forms!Form1!SubForm1!Code"

Thanks
 
Try this:

TITLE = DLookup("[TITLE]", "Table1", "
Code:
 = '" & [Forms]![Form1]![SubForm1]![CODE] & "'")
 

Users who are viewing this thread

Back
Top Bottom