My Dlookup is returning a string (I want a number)

See
Expr1: DLookUp("(AllowanceAMount)","tblAllowances","AllowanceID=1")

This returns the correct value BUT as a string...

I want [AllowanceAmount] returned as a number (which is how it is held on tblAllowances).

What should I do?
Patrick O'DeaAsked:
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.

Rey Obrero (Capricorn1)Commented:
in the design view of the query, select the column
right click and on the pop up menu select Properties

in the Format property, select the kind of format you want
0

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
Patrick O'DeaAuthor Commented:
Thank Rey,

I just learnt something!
0
PatHartmanCommented:
If you are using this DLookup() in a query, then you should change your method to use an outer join (left) to tblAllowances instead.  This will return the data you want with far less overhead and will not change the data type.

the DLookup() runs a SEPARATE query for EVERY row you select.  So, if you select 100 rows, you are running 101 queries.  If you select a thousand rows, you are running 1,001 queries.

NEVER, use domain functions in queries (or code loops) unless there is no alternative and except in rare cases, there is always an alternative.
0
Patrick O'DeaAuthor Commented:
Thanks Pat,
Your words of caution are appreciated ....
I will re-engineer the query (without the Dlookup)

Many thanks once again.
0
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.