H
hassan
hi every body
i have problem when i try update exist datea the massege runtime error
3022 appear
i used DAO and this is the code
Private Sub Command26_Click()
Dim rs As DAO.Recordset
Dim strSourceTable As String
Set LAMA = CurrentDb
Set rs = LAMA.OpenRecordset("patient", dbOpenDynaset)
'If rs.BOF = False Then
rs.Edit
rs!pid = [Forms]![P1]![pid]
rs!pname = [Forms]![P1]![pname]
rs!gender = [Forms]![P1]![gender]
rs!age = [Forms]![P1]![age]
rs!tel = [Forms]![P1]![tel]
rs!address = [Forms]![P1]![address]
rs!remark = [Forms]![P1]![remark]
rs.update
rs.Close
pid = Null
pname = Null
gender = Null
age = Null
tel = Null
address = Null
remark = Null
'Me.pid.Locked = True
Me.pname.Locked = True
Me.age.Locked = True
Me.tel.Locked = True
Me.address.Locked = True
Me.remark.Locked = True
Me.gender.Locked = True
Set LAMA = Nothing
End Sub
i have problem when i try update exist datea the massege runtime error
3022 appear
i used DAO and this is the code
Private Sub Command26_Click()
Dim rs As DAO.Recordset
Dim strSourceTable As String
Set LAMA = CurrentDb
Set rs = LAMA.OpenRecordset("patient", dbOpenDynaset)
'If rs.BOF = False Then
rs.Edit
rs!pid = [Forms]![P1]![pid]
rs!pname = [Forms]![P1]![pname]
rs!gender = [Forms]![P1]![gender]
rs!age = [Forms]![P1]![age]
rs!tel = [Forms]![P1]![tel]
rs!address = [Forms]![P1]![address]
rs!remark = [Forms]![P1]![remark]
rs.update
rs.Close
pid = Null
pname = Null
gender = Null
age = Null
tel = Null
address = Null
remark = Null
'Me.pid.Locked = True
Me.pname.Locked = True
Me.age.Locked = True
Me.tel.Locked = True
Me.address.Locked = True
Me.remark.Locked = True
Me.gender.Locked = True
Set LAMA = Nothing
End Sub