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

Updating existing record in database

Status
Not open for further replies.

spoox2

Programmer
May 23, 2003
3
0
0
US
I have a field "Quantity"(Its a invoice detail quantity which adds the number of items) in a form which updates a field "total" in a different table (Products table where the totals refers to the hands on quantity.). When i add a new invoice, i am able to handle it. But when i need to change an existing record , i.e update a wrongly entered quantity, i dunno how to handle the updated quantity and update the products total to match the difference between my old value for "Quantity" and the new value. I am new to visual basic. One way i thought was to actually handle the difference by subtracting the old value from the totals in the "Before Update" method and then add the new quantity in the "After Update" method. Please let me know if its the right way to go or is there a better approach. Any help would be appreciated. Thanx.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top