Home > OS >  Hide record from continuous form if checkbox is marked in query
Hide record from continuous form if checkbox is marked in query

Time:09-09

I have a continuous Form with records, the records contain a yes/no. So if the checkbox in the form is marked I want the record to be hidden from the form next time you open it, but it does not seem to work.

Private Sub Form_AfterUpdate()
If Me.Checkbox = False Then
Me.Checkbox.Visble = True
Else
Me.Checkbox.Visible = False
End If
End Sub

CodePudding user response:

Add a Boolean field named Hidden having a DefaultValue of False in the table and, in the form, bind this field to the checkbox.

Then, when opening the form, filter on [Hidden] = False.

  • Related