Object error on a DLookup

Jmsteph

Registered User.
Local time
, 21:29
Joined
Dec 2, 2008
Messages
28
Hello,

This is my first time posting so please excuse my ignorance. What I am trying to do is upon updating a form I need to check what was selected in the [FormTitle] “without space” combo box on the active form and look in the [Documents] table to link it to [Form Title] and when it finds a match pull the data in the [Document Title] field “with a space”. Unfortunately I am getting an object error stating it does not recognize the [Form Title] field in the table. Can someone help me with this?
Thanks,

DocumentTitle.Value = DLookup("[Document Title]", "Documents", "[Form Title]=" & FormTitle.Value)
 
How about this:

Code:
[COLOR="red"][B]Me.[/B][/COLOR]DocumentTitle = DLookup("[Document Title]", "Documents", "[Form Title]=[B][COLOR="red"]'[/COLOR][/B]" & [COLOR="red"][B]Me.[/B][/COLOR]FormTitle & [B][COLOR="Red"]"'"[/COLOR][/B])
 
That worked perfectly. Thanks!!!!!
 

Users who are viewing this thread

Back
Top Bottom