Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

preventing users from editing a record

Status
Not open for further replies.

MandoThrasher

Programmer
Jul 12, 2002
49
0
0
US
I have a checkbox on a form. When the box is checked, I want to disable editing of the current record, including the ability to turn the checkbox back off. The checkbox is a final approval field and once it is checked there is no turning back, so to speak. I've got the following code in the onclick event of the checkbox:

Private Sub chkFinal_Click()
If chkFinal.Value <> 0 Then
With Me
.AllowAdditions = False
.AllowDeletions = False
.AllowEdits = False
End With
End If
End Sub

The code seems to be ignored. I have stepped through it to ensure that its getting executed. It is, but the form still allows me to edit data after this code executes.
 
try the code on Lost Focus or on current

Hope this helps
Hymn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top