Results 1 to 4 of 4
  1. #1
    ahackett90 is offline Novice
    Windows 8 Access 2007
    Join Date
    Sep 2015
    Posts
    2

    Stuck on a Calculation Multiplied by Another Column

    I am attempting the practice exam for an exam I am sitting this Thursday and I am stuck on one of the queries:
    • Calculate the total value of the missing stock. To do this, you must multiply the missing stock from question 5 by the Cost per Item column. Rename the calculated column appropriately. Include the Department ID number, Person in Charge and the calculated column. Sort in descending order. Save this query as VALUE OF MISSING STOCK.


    I have calculated the total missing stock (from question 5 per the above) by subtracting the stock take count from the recorded stock on hand, which is fine, but I am having troubles multiplying this by the cost per item.

    My query as it stands is as follows:


    Click image for larger version. 

Name:	Query 1.png 
Views:	13 
Size:	6.0 KB 
ID:	21967Click image for larger version. 

Name:	Query 2.png 
Views:	13 
Size:	3.8 KB 
ID:	21968

    The calculation is: Missing Stock at Cost: [Stocktake Quantity]-[Recorded Quantity on Hand ]*[Cost per item]
    Is this like excel where I need to have a second set of brackets around the subtraction before I can multiply?

    I believe there is something wrong with my calculation to get the cost of the missing stock, but I am not sure what.
    Please help! Thank you.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Perhaps:
    (([Stocktake Quantity]-[Recorded Quantity on Hand]) * [Cost per item])
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    Further to Bob's response, this is not an Excel vs Access thing. This is the precedence/order of operations in arithmetic expressions. Often referred to as BEDMAS which stands for
    -brackets
    -exponents
    -division
    -multiplication
    -addition
    -subtraction

    The default order is left to right.

  4. #4
    ahackett90 is offline Novice
    Windows 8 Access 2007
    Join Date
    Sep 2015
    Posts
    2
    Thanks Bob! This is exactly what I was missing. I had tried using the {} brackets, but they are clearly not the correct ones.

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

Similar Threads

  1. Query Results being Multiplied
    By E1202413 in forum Access
    Replies: 4
    Last Post: 11-14-2014, 09:08 AM
  2. Replies: 1
    Last Post: 09-29-2014, 03:35 PM
  3. Calculation into a column
    By phineas629 in forum Programming
    Replies: 5
    Last Post: 04-25-2014, 12:40 AM
  4. Query Issues: Multiplied Results
    By Sa'El in forum Access
    Replies: 1
    Last Post: 09-12-2011, 09:46 AM
  5. Replies: 2
    Last Post: 03-03-2010, 07: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