rahulpatel
Programmer
I'm trying to add 2 fields from a database using SQL. They are both numbers and once added together and stored in another field, the result will be displayed in a text box. However, I have tried every permutation of fields and adding I can think of (apart from the correct one obviously) and I cannot get the thing to work.
What I was hoping this would do is update my db and make the field 'quantity' equal to quantity value plus whatever number was in 'quantityin'. But it doesn't work.
Can anyone enlighten me as to how to do it?
Cheers...
Code:
SQL = "UPDATE Stores SET quantity = (quantity + quantityin) WHERE barcode = '" & (txtSearch.Text) & "'"
What I was hoping this would do is update my db and make the field 'quantity' equal to quantity value plus whatever number was in 'quantityin'. But it doesn't work.
Can anyone enlighten me as to how to do it?
Cheers...