calulation using SQL SUM in vb.net help needed

soppaln1

Member
Joined
Mar 28, 2006
Messages
13
Programming Experience
Beginner
hey guys

i have a new query, pls look at the tables below,
<p>
Basically a specified transaction may have many items, once the items are added into the "transactions table" i would like to calulate the total for a specified transaction,
for example in the table shown below i would like to select the "calculate total" button and what this shud do
is add up all the prices(named pr in the table) for a specified transaction from the price column,
<p>
lets say for example trans 22 as shown in the table called "transaction", and the sum of the prices for transaction 22 should
be put in the TOTAL table in the field called Total along wid the number of the specified transaction as shown in the screen shot, then the total for this specified transaction shud be put on the label called TOTAL as shown in the screen shot.

any ideas how do do this im really stuck i have tried but im not having much luck!

pls could someone help me, its for a project and urgently needed!

kind regards
Sam
tables.jpgtotal.jpglabel.jpg
 
Moved to MS Access forum. Nice screenshots.
 
why have you moved this to the ms access forum its actually using VB.NET as the front end and Access as the database i would say its best suited in the vb.net section, anyways im sure you have your valid reasons.

remember i am tryin to hard code this in VB.NET manipulating my Access database using sql commands,
 
All the forums here are for VB.Net. Your question sounded related to interacting with MS Access.
 
soppaln1 said:
hey guys

i have a new query, pls look at the tables below,
<p>
Basically a specified transaction may have many items, once the items are added into the "transactions table" i would like to calulate the total for a specified transaction,
for example in the table shown below i would like to select the "calculate total" button and what this shud do
is add up all the prices(named pr in the table) for a specified transaction from the price column,
<p>
lets say for example trans 22 as shown in the table called "transaction", and the sum of the prices for transaction 22 should
be put in the TOTAL table in the field called Total along wid the number of the specified transaction as shown in the screen shot, then the total for this specified transaction shud be put on the label called TOTAL as shown in the screen shot.

any ideas how do do this im really stuck i have tried but im not having much luck!

pls could someone help me, its for a project and urgently needed!

kind regards
Sam
Hey please stop to object cuz your thread was moved to more appropriate forum. JohnN is very good moderator and it's usually to be moved if it doesn't fit to the forum that you posted at. However in the future please avoid long explanations cuz peeps don't like to read a lot and rather give a brief description of the problem. Contact me via Yahoo IM and i'll help you to finish up this project.
Regards ;)
 
Back
Top