Avatar of torttion
torttion
 asked on

Access Asset Inventory Summation

Hi,
I have an simple access database that I'm using the track inventory items.  I have a table with four fields, the first is an auto numbered key field, then I have a "From" location field, a "To" location Field and "Quantity" field that tracks the number of units moved from the "From" location to the "To" location.
I'd like to be able to choose a location and have the database add the quantity delivered to a location and then subtract the quantity taken From that location to give me a total number of items at that location.
I've done this in excel simply have a "From Qty" column and a "To Qty" column.  Then I multiply the From column by -1 to make it a negative number and add it to the To column which gives me the total number of items at any given location.  
Any help is greatly appreciated.
Microsoft ApplicationsMicrosoft AccessDatabases

Avatar of undefined
Last Comment
Jeffrey Coachman

8/22/2022 - Mon
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015

In a properly normalized relational database there will be two records.
1) a record for the From   with a negativequantityy
2) a record  for the To with positivevquantityty.

transactiontion tawouldoudl look something like:

Trx_ID - auto number primary key
Trx_LocationID  (foreign key to Location table)
Trx_Date
Trx_TrxType  - (foreign key to transaction types)
Trx_Quantity  
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015

Oops I forgot a field.

Trx_ID - auto number primary key
Trx_LocationID  (foreign key to Location table)
Trx_Date
Trx_TrxType  - (foreign key to transaction types)
Trx_ItemID - (foreign key to items)
Trx_Quantity  
 
With  the above structurer you simple sum the records to for a location and Item get the quantity.
ASKER CERTIFIED SOLUTION
Jeffrey Coachman

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck