Dlookup

arage

Registered User.
Local time
Today, 01:06
Joined
Dec 30, 2000
Messages
537
Dlookup
I’m fine tuning a report & am using the dlookup function in the detail sections onFormat event. I typed this code:

intCollCod = DLookup("Code", "Collections", Title = Me.Title)

but this isn’t executing correctly, intCollCod keeps returning the value of the first collection in the domain, rather than the code associated with me.Title as in the the criteria. Me.Title appears as a field in this section as well. Would appreciate any help.
 
assuming that Title is of type text, you could try
Code:
intCollCod = DLookup("Code", "Collections", "[Title] = '" & Me!Title & "'")
HTH nouba
 
Bit of info for ya
Dave
 

Attachments

Users who are viewing this thread

Back
Top Bottom