Locking fields on a continuous form

  • Thread starter Thread starter cryder
  • Start date Start date
C

cryder

Guest
Access 97!!

I have a continuous form that has a check box to tick if the row is complete. When tick the check box I need all the fields for that row to be locked. When i try it on a continuos form it locks all the rows.
 
You do need to bind the checkbox if it is not already bound. But, remember, there is only one set of control properties for a form - even a continuous form or datasheet view. Therefore, actions such as locking or hiding a control, affect all visible rows. In the case of locking, what does it matter if all rows are locked or unlocked? The cursor can be in only one place at a time and that place is the current record and that record should dictate the status.

The locking code needs to be in the AfterUpdate event of the checkbox PLUS in the Current event of the form.

Code:
If xx Then
  Me.SomeControl.Locked = yes
Else
  Me.SomeControl.Locked = no
End If
 

Users who are viewing this thread

Back
Top Bottom