I actually use the query method to get that particular row. There is no problem in getting that particular data and putting it in the recordset. The problem is that when I update it using this code. It don't update that particular row instead it updates whatever is in the first one. I.m wondering do I have to use "Update" to update it.
Private Sub cmdupdate_Click()
Set rst = New ADODB.Recordset
rst.Source = "CLIENT"
rst.CursorType = adOpenStatic
rst.LockType = adLockPessimistic
rst.ActiveConnection = _
"Provider=Microsoft.JET.OLEDB.4.0; " & _
"Data Source= " & App.Path & "\NA.MDB"
rst.Open Options:=adCmdTable
rst(0) = txtCName.Text
rst(1) = txtCAddress.Text
rst(2) = txtCPhone.Text
rst(3) = txtCFax.Text
rst(4) = txtCPostCode.Text
rst(5) = txtCNumber.Text
rst.Update
rst.Close
Set rst = Nothing
Dim answer As Integer
answer = MsgBox("Client details have been updated! " & (Chr(13)) & _
"Do you want to make another change?", _
vbYesNo + vbInformation + vbMsgBoxSetForeground, "Confirmed"
End Sub
TerpFan2001
Thanks for your replay