Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiplication Issue 2

Status
Not open for further replies.

scottcraft

Instructor
Nov 16, 2004
11
US
I am new to the Access world, but loving it. I have been tasked to create a simple mathamatical formula, however I just don't have the knowledge (yet). I have two columns named OnHand (inventory On Hand) and PricePer (cost per item). I want to create a query with a third column called InvTotal. The only Table I am using is named DATABASE. Question 1: Must a create a column in the Database named InvTotal? Question 2: Can I do this simple process using a Query? If so, please explain how do develope the Query. I know I have to use some type of formula, but I'm still new. Please treat me as a child and walk me through the query process.

thanks
 
No you don't want to create a new field in your table to store a calculated number (breaks normalization rules; for more on normalization read Fundamentals of Relational Database Design).

Yes you will want to calculate this in the query:

Code:
SELECT ProdID, OnHand, PricePer, (Onhand * PricePer) As TotalValue FROM Database

HTH

Leslie

Leslie
 
What do you want to do with your result (the monetary value of the total inventory)?

You can use a simple query to do arithmetic.

Create a simple query using the query wizard and your table. Open the query in design view. All fields will be listed in the query when you open it in design view.

Go to the first blank field and enter: =([fieldname1]*[fieldname2]) -- be sure and use the parentheses and square brackets as above. (a parentheses sets off actions such as arithmetic; square brackets are used for field names)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top