how do I make a number entered in one table subtract from another

J

John

I made a table to track quantity of personal protective equipment, and
another table to track who the equipment was issued to and the quantity
given. How do I make the quantity issued subtract from the quantity on hand?
 
S

Steve

You don't have enough tables! You need:
TblPerson
PersonID
FirstName
LastName
<other person fields as needed>

TblPersonalProtectiveEquip
PersonalProtectiveEquipID
PersonalProtectiveEquipItem
PersonalProtectiveEquipInventory

TblPersonalProtectiveEquipDistribution
PersonalProtectiveEquipDistributionID
PersonID
PersonalProtectiveEquipID
PersonalProtectiveEquipDistributionDate
PersonalProtectiveEquipDistributionQuantity

Any time you record PersonalProtectiveEquipDistributionQuantity in
TblPersonalProtectiveEquipDistribution you need to subtract the value from
PersonalProtectiveEquipInventory in TblPersonalProtectiveEquip.

This is very basic. You need ways to account for purchases, obsolescense,
lost or stolen, etc.

Steve
(e-mail address removed)
 
J

John W. Vinson

I made a table to track quantity of personal protective equipment, and
another table to track who the equipment was issued to and the quantity
given. How do I make the quantity issued subtract from the quantity on hand?

Generall... You don't.

Instead store the base value, and use a Totals query to dynamically sum the
checkout quantities and subtract from the base.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top