Question I need help to solve subtraction in my database

rexmontilla

New member
Local time
Yesterday, 22:27
Joined
Dec 23, 2008
Messages
2
hi everyone,

i'm newbie here i am glad that found this site i think it help me a lot sorry for my english.

i want to create a database in access that can subtract the field. I am very new to access i just the basic i sometimes use the query wizard to total the quantity but now it seems the there is no wizard for the subtraction.

this is what i made i edit the wizard just to try to solve it

SELECT DISTINCTROW Table1.ID, Table1.name, Table1.Description, sum(Table2.Add)-(Minus.Minus) AS [Qty on Hand]
FROM Table1 INNER JOIN Table2 ON Table1.ID=Table2.ID
GROUP BY Table1.ID, Table1.name, Table1.Description;

please help me
 
If you store additions to stock as positive values and deductions from stock as negative values then you can just sum them to get quantity on hand.
 
I'm not exactly clear what you're trying to achieve - is it:

- you're trying update a field in your table by subtracting numbers from it?

- you don't want to change the values in the table, but you want to show them with numbers subtracted?

- You want to delete whole rows from your table?
 
I'm not exactly clear what you're trying to achieve - is it:

- you're trying update a field in your table by subtracting numbers from it?

- you don't want to change the values in the table, but you want to show them with numbers subtracted?

- You want to delete whole rows from your table?

hello thanks for your reply..

i create an inventory in a small stock room there is a people who withdraw the items and there is a supplier who add to the items what i need is a database which i can see the item left or stock on hand, yes i want to update a field where i can see how many left in the stock room. i have 2 fields, 1 is for master list and the other is withdrawal field, anything in the withdrawal field will subtract the quantity in the master list. i am sure my sql statement is wrong. can you give me an example of database or a statement to show how subtraction is done.

thank you.
 

Users who are viewing this thread

Back
Top Bottom