Results 1 to 3 of 3
  1. #1
    aronnov is offline Novice
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    2

    Help dividing two fields in a query

    how can i create a custom field in a query to take the sum of column a which is named 'H' and divide it by the sum of column b which is 'AB'? I already have the two columns summing. I just need help on how to create a custom field which i have no idea how to do and the syntax for the formula "column H/ column AB"

  2. #2
    aronnov is offline Novice
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    2
    alright. I have answered all my questions except one now.

    is there a way to convert any number that ends in .333, .667, and .999 using an expression in a query?

    the idea is to convert any number ending in .333 to .1, .667 to .2, and .999 to 1.0
    Last edited by aronnov; 04-29-2010 at 11:54 AM.

  3. #3
    okerix is offline Novice
    Windows 7 Access 2007
    Join Date
    Apr 2010
    Posts
    3
    Use a Switch in your expression like this:

    Switch([Field]=.333,.1,[Field]=.667,.2,[Field]=.999,1.0)

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

Similar Threads

  1. Replies: 2
    Last Post: 03-23-2011, 11:13 AM
  2. Query to Average on Grouped Fields
    By randolphoralph in forum Queries
    Replies: 1
    Last Post: 03-16-2010, 08:03 PM
  3. Yes/No Fields and Criteria in a Query
    By omicronkappa278 in forum Access
    Replies: 1
    Last Post: 05-22-2009, 09:51 AM
  4. Query to Display Tables & Fields
    By foxerator in forum Queries
    Replies: 0
    Last Post: 04-24-2008, 09:57 AM
  5. 2 different fields into 1 column by query?
    By rainxking in forum Queries
    Replies: 1
    Last Post: 06-04-2006, 09:37 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