Results 1 to 7 of 7
  1. #1
    Cran29 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    38

    Totalling up from two fields with various quantities selected

    I have two tables one called PPEEmployee which has the following fields equipment issued date issued and the quantity 1-2-3 etc. I also have a table called PersonalProtectiveEquipment with the fields Type/ ItemCost/ PackCost and a total cost


    How would the query be in order to add the fields ItemCost and PackCost to display in TotalCost. The quantity isued would need to mutiply these figures by what ever is selected eg in the quantity field by 1-2-3 . I have a calender table and would like a total start date and end date for the year Dont know if this is the correct line any help would be great

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,602
    How are these tables related? Is there a pk/fk to link them?

    TotalCost should not be a field in table. This should be a calculated field in a query.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Cran29 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    38
    The primary key is linked to the employee table from the PPE table. Perhaps i am going the wrong way about this. I have attached pictures of the set up. Basically it records what equipment is issued to an individual on a specific date along with the quantity. It all works fine. I would now like to add a cost to the items issued and run a total cost for each item in the list.
    Attached Files Attached Files

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,602
    What is relationship of Employee and PersonalProtectiveEmployee tables? The tables are linked on the primary key fields. This can be done only if one of the pk's (the 'child' table) is not autonumber and the tables have one-to-one relationship.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Cran29 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    38
    I have used the following Query and it returns results. However it returns all the information in strange groups. It adds most of the quantities together but separates some. Why wont it group them totally into Rigger gloves one line total etc. When i try and enter the following query to display only between dates it returns nothing any ideas

    Between #01/04/2012# And #31/03/2014#
    Attached Files Attached Files

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,602
    It's because you have included Quantity and ItemCost as grouping criteria. Remove them. Then under the Cost calculation, select Sum instead of Expression.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Cran29 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2010
    Posts
    38

    Solved

    Managed to crack it with the help of a friend
    Attached Files Attached Files

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

Similar Threads

  1. Totalling
    By cbrsix in forum Reports
    Replies: 17
    Last Post: 11-17-2011, 02:54 PM
  2. Form to' export selected fields
    By Fabdav in forum Forms
    Replies: 3
    Last Post: 10-08-2011, 11:28 AM
  3. Replies: 1
    Last Post: 08-17-2010, 02:33 PM
  4. Replies: 5
    Last Post: 06-07-2010, 12:20 PM
  5. Copying selected fields to a new record
    By Lyle Bitikofer in forum Forms
    Replies: 0
    Last Post: 12-13-2009, 04:01 PM

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