Continuous forms

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

Guest

Hello. I have a form set to continuous bound to a table.
For each record of the table i have a Yes/No field.
I want to know if its possible to lock all the controls of the continuous
form for the records that has that field value TRUE.

Thanks
 
The user can only change one record (the current one), so it is really just
the current record you need to lock.

To do that, use the Current event of the form.

This example prevents the edit or deletion of a record where MyYesNo is
true:

Private Sub Form_Current()
Dim bAllow As Boolean
bAllow = Not Nz(Me.[MyYesNo], False)
Me.AllowEdits = bAllow
Me.AllowDeletions = bAllow
End Sub
 
Back
Top