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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Total?

Status
Not open for further replies.

wdverner

Technical User
Mar 10, 2005
160
GB
Hi Guys,
I have constructed the following:

SELECT Components.PartNo, Components.Component, qLastStockTake.Stock, qReceived.Received
FROM (qLastStockTake INNER JOIN Components ON qLastStockTake.PartNo = Components.PartNo) INNER JOIN qReceived ON (qLastStockTake.Component = qReceived.Component) AND (qLastStockTake.PartNo = qReceived.PartNo)
GROUP BY Components.PartNo, Components.Component, qLastStockTake.Stock, qReceived.Received;

Now I want to add in another field that will SUM the Received and Stock fields together. However I keep getting a field which just joins Received and Stock.

For example for Part 1 i have 1000 in stock, 1000 Received. I want total to give me 2000. However at present when I sum the fields i get 10001000?

What silly mistake am I making?!
 
are you using the "+" sign to add them together.

Also are the fields you are trying to add together Number fields???

Hope this help
 
i was using Grand Total: Sum([Stock]+[Received])

and they are both number fields yes?
 
If your fields([stock],[Recieved]) are bound to the table then DataType might be set to text. Change to Number Also on form format to number.
If they are unbound then set format to any of the number formats.

Zameer Abdulla
Visit Me (New Look & style)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top