PDA

Click to See Complete Forum and Search --> : Please Help!


Jason B
May 18th, 2000, 09:11 AM
Hi..
Just trying to write vb in access 2000 and want to be able to search for a particular salesnumber in the SalesOrderNo column. Once all the sales with the SalesOrderNo being equal to "66631" have been found. Once they have been found i want to be able to minus the quantity from another field for all the records that match the SalesOrderNo and then total up all the values.

to make it short, want to find all the records that have a particular salesorderno from the [pallet table]. Subtract [Returned Qty] from the[Original Del Quantity] field for all the records found and then Add the values calculated and put it in a variable. Want to do this is in access 2000 using visual basic which is inside Access...

Please Help!!!!

LG
May 20th, 2000, 08:31 AM
You can create query:
SELECT Original_Del_Quantity,Returned_Qty,Original_Del_Quantity - Returned_Qty As Diff
FROM Pallet_Table
WHERE SalesOrderNo='66631'

and then you can find total:
SELECT SUM(Original_Del_Quantity - Returned_Qty)
FROM Your_Query_name

[Edited by LG on 05-20-2000 at 09:31 PM]