I am currently setting up a db, and I am at a point where a record might need to be locked down if a certain checkbox is activated. Does anyone out there know how to accomplish this?
I personally have a form where I did this by locking all of the controls, and call this from the Form_Current Event, this way when you go to that record, it will know whether to lock or not
Code:
Sub Locking
On Error goto Err_Locking
For Each ctlControl In frmYours.Controls
ctlControl.Locked = chkLock
Next
'so you can still uncheck this
chkLock.Locked = False
Exit_Locking:
Exit Sub
Err_Locking:
'if control doesn't lock eg. lables etc.
If Err = 438 Then
Resume Next
Else
MsgBox Err.Description
Resume Exit_Locking
End If