-
Nov 25th, 2009, 01:28 AM
#1
Thread Starter
Member
[RESOLVED] How to edit recordset in ms access 2003 database using vb 6.0
Hello..
Anyone know how to edit recordset
I want to edit existing record in my database but my problem is my record did not changed,Here's my code,
rs.Edit
rs!name = TxtPen.Text
rs!Branch = TxtBranch.Text
rs!Home_Address = TxtHome.Text
rs.Update
Thanks
-
Nov 25th, 2009, 01:48 AM
#2
Re: How to edit recordset in ms access 2003 database using vb 6.0
That looks fine to me. Are you sure it is not being updated?
-
Nov 25th, 2009, 02:41 AM
#3
Thread Starter
Member
Re: How to edit recordset in ms access 2003 database using vb 6.0
Originally Posted by dee-u
That looks fine to me. Are you sure it is not being updated?
Thanks for the reply,
Yes sir the record is not updated,
i have 1 button for edit and 1 button for save
Here's my code,
'Edit records
Private Sub CmdEdit_Click()
If Not rs.RecordCount = 0 Then
rs.Edit
TxtName.Enabled = True
TxtBranch.Enabled = True
TxtHome.Enabled = True
Else
MsgBox "There's no records to edit", vbApplicationModal, "Massage"
End If
'Saving record after editing
Private Sub CmdSave_Click()
rs.Edit
rs!name = TxtPen.Text
rs!Branch = TxtBranch.Text
rs!Home_Address = TxtHome.Text
rs.Update
Thanks
-
Nov 26th, 2009, 07:22 AM
#4
Thread Starter
Member
Re: How to edit recordset in ms access 2003 database using vb 6.0
Originally Posted by ryanbesitulo
Thanks for the reply,
Yes sir the record is not updated,
i have 1 button for edit and 1 button for save
Here's my code,
'Edit records
Private Sub CmdEdit_Click()
If Not rs.RecordCount = 0 Then
rs.Edit
TxtName.Enabled = True
TxtBranch.Enabled = True
TxtHome.Enabled = True
Else
MsgBox "There's no records to edit", vbApplicationModal, "Massage"
End If
'Saving record after editing
Private Sub CmdSave_Click()
rs.Edit
rs!name = TxtPen.Text
rs!Branch = TxtBranch.Text
rs!Home_Address = TxtHome.Text
rs.Update
Thanks
I found the solution with my own
Thanks for the effort
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|