[RESOLVED] Updating database --- not new record ----
I've finally gotten everything working great the textboxes ,the comboboxes , the database etc :D I am using ADO code but was has me stuck is this....I can view my data but when I make changes and press my update button my message box pops up, I go to the next record but when I comeback, no changes were saved. I changed to adlockOptimistic. This is the code I'm using to udate changes to a record.
Private Sub cmdUpdate_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
rs.Update
MsgBox "Student information updated.", vbExclamation
End Sub
What am I doing wrong?? :sick:
Re: Updating database --- not new record ----
Are you using the ADODC Data control or are you manually coding all your rs code?
Re: Updating database --- not new record ----
Re: Updating database --- not new record ----
Then you need to tell it which fields to update.
VB Code:
rs.Fields("Field1").Value = "Something"
rs.Update
Re: Updating database --- not new record ----
Quote:
Originally Posted by graphixphantix
I've finally gotten everything working great the textboxes ,the comboboxes , the database etc :D I am using ADO code but was has me stuck is this....I can view my data but when I make changes and press my update button my message box pops up, I go to the next record but when I comeback, no changes were saved. I changed to adlockOptimistic. This is the code I'm using to udate changes to a record.
Private Sub cmdUpdate_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
rs.Update
MsgBox "Student information updated.", vbExclamation
End Sub
What am I doing wrong?? :sick:
Why don't you use the Click event?