title: How to update stock quantity
body: <p><strong>VB.NET</strong></p>
  
  <p>Well, I'm using Access as DB containing five tables viz. Vendors, PurOrder, Customers, SalesOrder, Stock.</p>
  
  <p>Vendors: VendorID(PK), Name, Contact, Phone, Address.</p>
  
  <p>PurOrder: POID(PK), Items, Quantity, Rate, Total</p>
  
  <p>Customers: CustID(PK), Name, Phone, Address</p>
  
  <p>SalesOrder: SOID(PK), Items, Quantity, Rate, Total</p>
  
  <p>Stock: SItemID(PK), Items, Quantity, Rate, Total
  I'm using the Database Wizard in VB.NET Express. I do not need to code for that. I click on Data Sourses > add the Database > Drag that to my Purchase and Sales form and that automaticaly creates the ADD, DELETE, &amp; SAVE as well as Navigation buttons as toolstrip. and furthermore I drag the Purchase order table (for example) to the form in Datagrid mode and that's it! Now, I can SAVE, DELETE, &amp; ADD records to my database as Purchases.</p>
  
  <p>Well I am able to enter and save/update purchase and sales vouchers and retrieve the reports Customer/Vendor ID-wise and print that.</p>
  
  <p>The only problem I have is that I don't know what to do in order to automatically update the sock quantity when purchase or sale is made.</p>
  
  <p>Thanks in advance.</p>