• ** There has been a recent site upgrade. Please clear your browser cache to avoid issues. **
  • New forum feature - post voting and best solution

    Check out this thread for the details: https://www.access-programmers.co.uk/forums/threads/new-forum-feature-post-voting-and-best-answer.314134/

    This new feature looks great to me! :)

  • We now have 3 forum themes

    Go for the default (light) theme, Shades of Grey or Shades of Blue. I just added the Blue one.

    The thread about it is here: https://www.access-programmers.co.uk/forums/threads/new-forum-theme-shades-of-blue.314136/

Solved Currency in Sentence (1 Viewer)

Malcolm17

Member
Local time
Today, 10:53
Joined
Jun 11, 2018
Messages
39
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
Today, 02:53
Joined
Oct 29, 2018
Messages
12,440
Hi. Check out the Format() function.
 

Malcolm17

Member
Local time
Today, 10:53
Joined
Jun 11, 2018
Messages
39
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
Today, 01:53
Joined
Mar 9, 2014
Messages
3,340
You have it backwards. Format(Sum(Total),"£#,###.##")

Or maybe

Format(Sum(Total), "Currency")
 

Malcolm17

Member
Local time
Today, 10:53
Joined
Jun 11, 2018
Messages
39
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
Today, 01:53
Joined
Mar 9, 2014
Messages
3,340
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
Today, 02:53
Joined
Oct 29, 2018
Messages
12,440
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