Solved Currency in Sentence (1 Viewer)

Malcolm17

Member
Local time
Today, 06:00
Joined
Jun 11, 2018
Messages
107
Hi,

Please can you help me to change the following on my report to show the total as currency. It is in the control source and I am trying to make it show as part of a sentence.

Code:
=[NewName] & " (£" & Sum(([Total])) & ")"

Also, if possible the following as ddd d mmm yyyy, h:mm am/pm

Code:
=Date() & ", " & Time()

Many thanks,

Malcolm
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 22:00
Joined
Oct 29, 2018
Messages
21,454
Hi. Check out the Format() function.
 

Malcolm17

Member
Local time
Today, 06:00
Joined
Jun 11, 2018
Messages
107
I've tried this for format but I just don't seem to be working out the right code for it just now, not sure what I am missing, please can you have a look? Thank you

Code:
=[NewName] & ": " & Sum(Format([Total],"£#,###.##"))
 

June7

AWF VIP
Local time
Yesterday, 21:00
Joined
Mar 9, 2014
Messages
5,465
You have it backwards. Format(Sum(Total),"£#,###.##")

Or maybe

Format(Sum(Total), "Currency")
 

Malcolm17

Member
Local time
Today, 06:00
Joined
Jun 11, 2018
Messages
107
Hi, thanks again for that - the second one worked. I did try the first one but it seemed to struggle with the decimal place and pennies.
 

June7

AWF VIP
Local time
Yesterday, 21:00
Joined
Mar 9, 2014
Messages
5,465
Actually, should have been: Format(Sum(Total), "£0.00")

But if your system is set for £ then "Currency" works.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 22:00
Joined
Oct 29, 2018
Messages
21,454
I've tried this for format but I just don't seem to be working out the right code for it just now, not sure what I am missing, please can you have a look? Thank you

Code:
=[NewName] & ": " & Sum(Format([Total],"£#,###.##"))
Hi. Sorry for the delay. Glad to hear you got it sorted out. Thanks for the assist, @June7.
 

Users who are viewing this thread

Top Bottom