Results 1 to 2 of 2
  1. #1
    wdrspens is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Posts
    35

    Format within a string

    I am sure this is the easiest problem to answer and has probably been answered many times before, but I have a string in a report that is:



    ="A 25% booking deposit of " & Sum([calcTotal])/4 & " is due within 14 days"

    How do I format the & Sum([calcTotal])/4 so that it gives a currency result complete with the currency sign. I believe I can use 'round' to get two decimal places, but can I use something else to give 2 decimal places and the appropriate currency sign?

    I can achieve the result by using the following:

    ="A 25% booking deposit of £" & Round(Sum([calcTotal])/4,2) & " is due within 14 days"

    But if the figure is a whole number it does not give the answer to two decimal places which means it looks untidy since all other fields are to two decimal places.


    Many thanks

    David
    Last edited by wdrspens; 04-16-2011 at 08:45 AM.

  2. #2
    wdrspens is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Posts
    35
    I think the answer is Format(Sum([calcTotal])/4,currency) anyway I'll give it a try in the morning.

    It did not work, but the answer appears to be Format(Sum([calcTotal])/4,"#,###.##"). That is working at the moment.
    Last edited by wdrspens; 04-17-2011 at 01:17 AM.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Setting SQL = string
    By jasonbarnes in forum Programming
    Replies: 7
    Last Post: 02-18-2011, 11:02 AM
  2. Formating string
    By Alex Motilal in forum Reports
    Replies: 7
    Last Post: 12-10-2010, 06:09 AM
  3. Using a string to DIM a Recordset
    By ColPat in forum Programming
    Replies: 10
    Last Post: 09-25-2010, 03:53 PM
  4. String Matching
    By tuna in forum Programming
    Replies: 1
    Last Post: 05-16-2010, 12:22 PM
  5. replace characters in a string
    By blazixinfo@yahoo.com in forum Access
    Replies: 6
    Last Post: 08-06-2009, 03:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums