I
injanib via AccessMonster.com
I have my form property setup to AllowEdits=false.
When the form is opended in edits mode all fields are locked, which is what I
want so that records are not accidentaly edited. I have created a button that
runs the line, Me.AllowEdits=True, to unlock the fields so that a record can
be changed if need be. Once the changes are made I have another button the
should lock the fields again by running the line, Me.AllowEdits=false. But
the second button does not work. It does not lock the fields.
Here is the codes.
Private Sub Save_Click()
On Error GoTo Err_Save_Click
Me.AllowEdits = False
Exit_Save_Click:
Exit Sub
Err_Save_Click:
MsgBox Err.Description
Resume Exit_Save_Click
End Sub
When the form is opended in edits mode all fields are locked, which is what I
want so that records are not accidentaly edited. I have created a button that
runs the line, Me.AllowEdits=True, to unlock the fields so that a record can
be changed if need be. Once the changes are made I have another button the
should lock the fields again by running the line, Me.AllowEdits=false. But
the second button does not work. It does not lock the fields.
Here is the codes.
Private Sub Save_Click()
On Error GoTo Err_Save_Click
Me.AllowEdits = False
Exit_Save_Click:
Exit Sub
Err_Save_Click:
MsgBox Err.Description
Resume Exit_Save_Click
End Sub