Hi everybody,
i'm buliding a database to manage a small business stock,
i have three tables:
one which contain the PRODUCTS INFORMATION and includes two fields product ID field and product name field.
the second table contains information about PRODUCTS IN STOCK, and feeds according to supply i get from suppliers, this table includes product ID field which is related to the PRODUCTS INFORMATION table, product name field and quantity field of each product i got from the supplier.
the third table includes information of OUT OF STOCK PRODUCTS and includes product ID field which is also related to the PRODUCTS INFORMATION table, product name field and quantity field of the product that was sold out.
the PRODUCTS IN STOCK table holds data of each product in a seprate record since the supply of every product is different in quantity. the OUT OF STOCK PRODUCTS table holds multiply values in the product field sinace the product are sold out in a packges and includes more then one product, and the quantity field referring to all the products in this field (each product*quantity).
i'm trying to calculate how many products do i have in stock, i tried to create two queries one that sums up the in stock and one that sums up the out of stock and create a query that substructs one from the other so i can see how many products remain in stock, it didn't work out, i get incorrect values.
my question is what will be the best way to do it, by query or a report? and how can i built it so i can see the products name in one field, the in stock of this product in the second field, the out of stock in the third field and forth field that calcultes how many of each product remain in stock.
thanks
Alot
i'm buliding a database to manage a small business stock,
i have three tables:
one which contain the PRODUCTS INFORMATION and includes two fields product ID field and product name field.
the second table contains information about PRODUCTS IN STOCK, and feeds according to supply i get from suppliers, this table includes product ID field which is related to the PRODUCTS INFORMATION table, product name field and quantity field of each product i got from the supplier.
the third table includes information of OUT OF STOCK PRODUCTS and includes product ID field which is also related to the PRODUCTS INFORMATION table, product name field and quantity field of the product that was sold out.
the PRODUCTS IN STOCK table holds data of each product in a seprate record since the supply of every product is different in quantity. the OUT OF STOCK PRODUCTS table holds multiply values in the product field sinace the product are sold out in a packges and includes more then one product, and the quantity field referring to all the products in this field (each product*quantity).
i'm trying to calculate how many products do i have in stock, i tried to create two queries one that sums up the in stock and one that sums up the out of stock and create a query that substructs one from the other so i can see how many products remain in stock, it didn't work out, i get incorrect values.
my question is what will be the best way to do it, by query or a report? and how can i built it so i can see the products name in one field, the in stock of this product in the second field, the out of stock in the third field and forth field that calcultes how many of each product remain in stock.
thanks

Last edited: