Visual Basic/VB6 (How to Update?)
Hello sir Kevin, I am a beginner in VB6 so i just want to ask about on how to update a record(s) or updating an existing records. I want to create a system for our school where we can keep track of the students records and payments. The task of this system is that it can Add, Save, Edit, Update and Delete records. For ex., we want to update the record of all the students who paid their tuition before the exam. The overall tuition of a student is P12,000 then if the student wants to pay P6,000, the tuition will be deducted by his/her payment so the current balance will be 6,000. The next time again the student will pay, the current balance will be deducted. So my problem now is that i don't know how to update the records every time the student will pay their tuition(s). Thank you in advance sir Kevin for your help and i really appreciate it. GOD BLESS!!!
I am assuming you are using Microsoft Access, set up your connection to the database, have already declared a variable for your database and recordset, etc.
In order to Add a new record you would use:
In order to delete a record you would use
In order to update a record you would use
Keep in mind however their will be a little more that just this line of code such as data validation.
Take a look at this link it goes a little deep than I do. One poster even gave some code samples