Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    robsworld78 is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Posts
    181
    Oh if I can't figure it out I'll probably post the db, don't want to do that just yet, its still a mess and you probably wouldn't know where to start.

  2. #17
    apr pillai's Avatar
    apr pillai is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2010
    Location
    Alappuzha, India
    Posts
    209

    Calculating Percentage

    Simplify the formula by adding three unbound textboxes and organizing the source value locations into them seprately like:

    Code:
    Textbox name: X
               =[OrdersOrdersSubform].[Form]![CoolerVolume]
    
    Textbox name: Y
               =[OrdersInventorySubform].[Form]![SumOfVolume]
    
    Textbox name: Z
               =[VendorInventoryLevelSubform].[Form]![SumOfVolume]     
    
    Textbox name: Result
               =[X]-[Y]-IIF(Nz([Z],0)>0,Z,0)
    The Nz() function checks for Null value in textbox Z, if Null then takes 0 as it's value otherwise takes the original value in Z.

    The Usage of IIF() is IIF(Condition, True, False).

    Example:
    T=2004
    = IIF((T MOD 4)=0, "Leap Year","Not Leap Year")

  3. #18
    robsworld78 is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Posts
    181
    Thanks for that! I'm currently just starting to rebuild the db from scratch, doing some major changes to how it works so I thought I would start fresh which allows me to fix things I know needed fixing. Once I get to that point again I'll give that a go and let you know how it worked.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Calculating a Percentage
    By Alaska1 in forum Access
    Replies: 7
    Last Post: 12-13-2010, 05:57 PM
  2. Replies: 3
    Last Post: 12-01-2010, 12:30 PM
  3. Percentage Calculation in a Query
    By Lynn in forum Queries
    Replies: 1
    Last Post: 07-16-2010, 11:23 PM
  4. Percentage Queries
    By bangemd in forum Queries
    Replies: 18
    Last Post: 05-21-2009, 09:32 AM
  5. percentage in a query
    By Peljo in forum Access
    Replies: 2
    Last Post: 02-27-2008, 10:51 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