Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2009
    Posts
    26

    Unanswered: Calculation in Access

    If I want to calculate a value in a field, based on two other numeric field values, does it have to be done in a query or can I also do it at the table / form level.

    For example I have a sales field, and a cost field, and I would like to calculate profit by subtracting costs from sales, does this have to be done in a query in a separate field? Is it also possible / correct to do this at the table and / or form level.

    Thank You,
    David

  2. #2
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    Calculations can be done on forms. Tables just store data, you can't perform calculations in a table.

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Calculations can be done anywhere besides tables.

    In a Query: Profit: [Sales] - [Costs] in the Field Row of a new column.
    In a Form/Report: =[Sales] - [Costs] in the Control Source of a Textbox.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  4. #4
    Join Date
    Apr 2009
    Posts
    26
    Quote Originally Posted by StarTrekker
    Calculations can be done anywhere besides tables.

    In a Query: Profit: [Sales] - [Costs] in the Field Row of a new column.
    In a Form/Report: =[Sales] - [Costs] in the Control Source of a Textbox.
    Much appreciated.
    David

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •