Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DLookup not working properly 1

Status
Not open for further replies.

NFI

Programmer
Jun 7, 2000
278
GB
Hello,

Having been told about DCount, I saw that I needed to use DLookup for one of my Control Source fields.

The code I'm using is this;
Code:
=DLookUp("[STR]","Job_M","[Title] = " & [ComboJob].[Value])

but it just returns #Error

All the field names are correct and I know ComboJob.Value returns the correct value, so why isn't this working?

Any thoughts would be much appreciated,

Thanks,

Paul
 
NFI,
STR is the name of the field and Job_M is the name of the table?
regards,
longhair
 
If Title is defined as string in the Job_M table:
Code:
=DLookUp("STR","Job_M","Title='" & [ComboJob] & "'")

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks for your help, chaps.

That was the problem, I needed to enclose ComboJob.Value in single quotes...

Many thanks,

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top