Results 1 to 6 of 6
  1. #1
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245

    #error from formating the other columns

    Hey,



    I have a query with an expression to total the rows. Worked great, until I tried formating it to % by using the format function...Format(expresssion, "Percent")

    The issue now is It leaves #error.

    the reason for the Format function is that it doesnt format by using the properties menu.

    Thanks,

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Where exactly are you doing this total? On a Form or Report?
    Note that the results of a FORMAT function is a string, so you cannot perform any mathematical function on it.
    You CAN format the results using the Properties menu. Under the Format Property, there is a "Percent" option.
    If you cannot get it to work, please provide an example (maybe you are trying to format integers instead of decimals?).

  3. #3
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245
    looking at the format function being a string, my guess would be that the Nz function is as well then? For my expression to work I use the NZ() to leave a value of zero if Null on my table. do you know how I would be able to get around this? personally It doesnt matter if my query Is decimals, but I would like my report to be Percent. Now, I have tried changing the text box properties to percent yet it ignores that request.

  4. #4
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You can coerce the results from NZ to be numeric by adding zero to the result:
    NZ(..,0) + 0

    Now, I have tried changing the text box properties to percent yet it ignores that request
    What is the format of the field that is the Source of your Text Box?
    If the Source is a formula, what is that formula?

  5. #5
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245
    awesome! coercing access to make it a number worked great! thanks for the advice!

  6. #6
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Great! Glad it worked out for you.

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

Similar Threads

  1. Conditional Formating
    By Derrick T. Davidson in forum Forms
    Replies: 5
    Last Post: 04-13-2013, 07:18 AM
  2. Check Box Formating.
    By cap.zadi in forum Reports
    Replies: 1
    Last Post: 11-08-2011, 11:08 AM
  3. Conditional formating!
    By karanvemuri in forum Access
    Replies: 3
    Last Post: 10-29-2011, 03:34 PM
  4. Formating string
    By Alex Motilal in forum Reports
    Replies: 7
    Last Post: 12-10-2010, 06:09 AM
  5. Querry formating
    By Zoroxeus in forum Queries
    Replies: 0
    Last Post: 03-07-2006, 11:00 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