Making individual records read-only

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This is a repost with some updated information.

I have a continuous form that pulls multiple records from
a table. What I need, is to add a check box to each
record that, when checked, will lock the other fields in
the specific record to make them uneditable. Everything I
have tried so far, has locked out all of the records
instead of the individual record I am trying to target.
In other words, a check on any record, locks all the
records on the form.
 
you probably want to reset the locked state of each control in the On
Current event

Something like this:

Private Sub Form_Current()
dim bShouldBeLocked as boolean
bShouldBeLocked = Your condition here
dim ctl as access.control
for each ctl in me.controls
ctl.locked = bShouldBeLocked
next

End Sub
 
Back
Top