Dlookup (1 Viewer)

arage

Registered User.
Local time
Today, 14: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.
 

Nouba

Registered User.
Local time
Today, 15:06
Joined
Oct 20, 2002
Messages
145
assuming that Title is of type text, you could try
Code:
intCollCod = DLookup("Code", "Collections", "[Title] = '" & Me!Title & "'")
HTH nouba
 

Oldsoftboss

AWF VIP
Local time
Today, 23:06
Joined
Oct 28, 2001
Messages
2,499
Bit of info for ya
Dave
 

Attachments

  • dlookup.zip
    3.9 KB · Views: 166

Users who are viewing this thread

Top Bottom