i need an query for update my record added by old value and new updated value \

here is my query :
conn.Execute ("Update Medicine_Details SET UnitsInStock='" & rs3.Fields.Item(3).Value & "' where ProductID='" & rs3.Fields.Item(2).Value & "'")

but i dont know how to use sum in function these query working updating record but i need updating and counting also existing record ...

Recommended Answers

All 2 Replies

Is this what you need?

("Update Medicine_Details SET UnitsInStock = UnitsInStock + " & rs3.Fields.Item(3).Value & " where ProductID='" & rs3.Fields.Item(2).Value & "'")

thank you dude DaveAmour

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.