Results 1 to 3 of 3
  1. #1
    LanieB is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    54

    Iff statement will not allow me to set format...

    Average: IIf([Points Earned]=0 AND [Points Available]=0,"N/A",IIf([Points Available]=0,0,[Points Earned]/[Points Available])
    I am using the IFF statement above and before I added this section of it (IIf([Points Earned]=0 AND [Points Available]=0,"N/A",) I had the result showing as a percentage with two decimal places. Now I am unable to display the results as a percentage OR pick the amount of decimal places. I have tried to set the format and change the amount of decimals in both the query and the report, but neither will work. Does anyone know how I can get my result to display as percentages?



  2. #2
    pdebaets is offline Competent Performer
    Windows Vista Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Los Angeles
    Posts
    235
    try this:

    Average: IIf([Points Earned]=0 AND [Points Available]=0,"N/A",format(IIf([Points Available]=0,0,[Points Earned]/[Points Available]),"percent"))

  3. #3
    LanieB is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    54
    I change the "N/A" to NULL, that way it just shows up blank AND it will allow me to format!!

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

Similar Threads

  1. Replies: 7
    Last Post: 08-17-2011, 01:49 PM
  2. Format numbers
    By gauja in forum Access
    Replies: 2
    Last Post: 05-10-2011, 12:00 PM
  3. Report in pdf format
    By Alex Motilal in forum Reports
    Replies: 3
    Last Post: 01-02-2011, 07:25 AM
  4. format
    By nkuebelbeck in forum Queries
    Replies: 1
    Last Post: 03-23-2010, 10:22 AM
  5. Background Format
    By maysamab in forum Reports
    Replies: 7
    Last Post: 04-06-2009, 10:38 AM

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