Format DLookup to Currency

flemmo

Registered User.
Local time
Today, 08:22
Joined
Apr 26, 2006
Messages
69
I have the following:

Code:
=DLookUp("Nz([GetTotals],0)","TotalExp_SO_Show")

Anyone know how I can format it to a currency? I've tried putting £#,##0.00;(£#,##0.00) in the format box on the property sheet. This usually works but doesn't seem to with DLookup.

Cheers
 
how are you using this

if the field or variable which is being used is set as currency it will be currency

if its a field in a query, this sometimes doesnt work, but you may be able to format the column to currency by changing the query field properties
 
Yes its from a query so:

Query is called TotalExp_SO_Show which contains the following:
Code:
GetTotals: Sum(CCur(Nz([UnitPrice])*Nz([Quantity])*(1-Nz([OrderDiscount]))/100)*100)

I've tried setting the format in the query, which works when viewing the query datasheet, but when pulling this into the form with DLookup, the formatting is lost.

So in the query I get:
£11,024.25

and in the form I get:
11024.25
 
I think I've solved it. I've put in another CCur on the textbox. Why the existing one in the query is ignored I don't know.

Code:
=CCur(DLookUp("Nz([GetTotals],0)","TotalExp_SO_Show"))
 

Users who are viewing this thread

Back
Top Bottom