Results 1 to 4 of 4
  1. #1
    JimO is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    126

    Format Concatenated String

    I have the following code on a form that displays the data I am looking for but not quite in the format I would like.



    Code:
    ="Team Season - " & [Record] & " - " & Format("0.000%",[Wins]/[TotalGames])
    I would like to display the data as ' Team Season - 18/17 0.514% '. Everything works now except the format of the percent, it showns up as ' Team Season - 18/17 0.514285...... '. Any ideas?

    Jim O
    Last edited by JimO; 05-17-2016 at 05:44 PM.

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    The format string and expression are reversed.
    Not sure if it is the correct format string, but try
    Code:
    "Team Season - " & [Record] & " - " & Format([Wins]/[TotalGames],"0.000%")

  3. #3
    JimO is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    126
    Thank you for the help. I did have to add one correction, [Wins]/[TotalGames]/100. It is working fine now.

    Jim O

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Great. Glad to be of help.

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

Similar Threads

  1. Replies: 6
    Last Post: 07-16-2014, 12:44 PM
  2. Replies: 3
    Last Post: 09-02-2013, 12:58 PM
  3. Replies: 4
    Last Post: 11-03-2012, 10:44 PM
  4. Replies: 17
    Last Post: 01-12-2012, 11:25 AM
  5. Format within a string
    By wdrspens in forum Reports
    Replies: 1
    Last Post: 04-16-2011, 05:51 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