a problem with a dlookup that use a like ceriteria on access 2013

hi

i want to use a dlookup to get a value with a like ceriteria, but i'm getting an error is some one know what is the problem with the sytax:

 DLookUp("price","ReportT","notes like "*a sample value*") 

Open in new window

bill201Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MASEE Solution Guide - Technical Dept HeadCommented:
Can you upload the db with all your data removed and only that part you need?
And explain which data to be pulled/displayed
Gustav BrockCIOCommented:
Try with a pair of single quotes:

DLookUp("price","ReportT","[notes] Like '*a sample value*'")

/gustav

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PatHartmanCommented:
It doesn't make sense to use DLookup() with Like *.  DLookup() will bring back only one value and if there are multiple matches to the criteria, what you get will be random.
Powerful Yet Easy-to-Use Network Monitoring

Identify excessive bandwidth utilization or unexpected application traffic with SolarWinds Bandwidth Analyzer Pack.

Jeffrey CoachmanMIS LiasonCommented:
Also let's be clear that if: "Report", ...is an actual "Report" object  (and not simply a poorly named Table), ...that you cannot even use Dlookup on a Report Field...

Also note that Dlookup will only find the "First" matching record, ...so if more than one record contains "*a sample value*", then dlookup will only display the first one it finds, ...
So we need to be clear on if you are simply trying to lookup one record value (what dlookup up is designed to do, by finding only the *First* match))
...Or are you trying to Filter for all Notes  that contain "*a sample value*"? (Filtering)

then I am sure any of us can assist...
;-)

JeffCoachman
bill201Author Commented:
thanks for every one for your excellent answers, I really apologize for my late reply.

 I'll be honest with you why i respond some times Much later after I got the answers,  English is not my mother language, and I have difficulty to express themselves properly in English, (i use alot google translate but not always it's good enough) on the other hand, I feel obliged to admit and treat all who responded and tried to help me, it takes me a while, any way thanks alot dear people.

MAS: You're right, but I have database sensitive data so I prefer not to Upload the data if it's not Necessary.
Gustav Brock:Thanks for your excellent answer that solved the problem.
PatH Hartman: thanks for your comment, You're absolutely right, it's my typing mistake it's was s dsum and not dlookup.
Jeffrey Coachman: thanks for your excellent explanation, but like i said before it's was just a typing mistake and i need a dsum and not a dlookup.
MASEE Solution Guide - Technical Dept HeadCommented:
Glad to know you got a solution
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.