Hello it's me again i'm having problem with the database subtraction for my POS Project im using ado database and i know that you just have to change the value from the selected and voila it would update the database but mine doesnt work:
' txtqan is connect to the item database
txtqan.text = Val(txtqan.text) - Val(txtsalesqan.text)
thx for the help i just change the code a little bit and it work just add .recordset to make it work for my system thx here the new code:
1. Dim x as Integer, y as Integer, z as Integer
2. x = Val(txtQan.Text)
3. y = Val(txtSalesQan.Text)
4. z = x - y
5.
6. rsQan.recordset!Qauntity = z
7. 'rsQan is your recordset
8. 'Qauntity is your field name
Last edited by ivankenny; Nov 1st, 2009 at 7:57 pm.
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.