M
M.John
Hi,
I Hope you guys can help me. I need to lock a single record in a suborm. The
code I have is (in the subform)
I basically need to allow only one addition to the table, after this they
should only be allowed to edit the record, no further additions. The problem
is that it locks all of the records as it is locking the table and not the
individual row for each subform record.
Private Sub Form_Current()
Dim rs As Recordset
rs.Clone
rs.MoveLast
If rs.RecordCount = 0 Then
Me.AllowAdditions = True
Me.AllowEdits = True
Else
Me.AllowAdditions = False
Me.AllowEdits = True
End Sub
What am I doing wrong, is it possible to lock down just a single row ?.
Thanks in advance
AMJ
I Hope you guys can help me. I need to lock a single record in a suborm. The
code I have is (in the subform)
I basically need to allow only one addition to the table, after this they
should only be allowed to edit the record, no further additions. The problem
is that it locks all of the records as it is locking the table and not the
individual row for each subform record.
Private Sub Form_Current()
Dim rs As Recordset
rs.Clone
rs.MoveLast
If rs.RecordCount = 0 Then
Me.AllowAdditions = True
Me.AllowEdits = True
Else
Me.AllowAdditions = False
Me.AllowEdits = True
End Sub
What am I doing wrong, is it possible to lock down just a single row ?.
Thanks in advance
AMJ