Checkbox on "no edit" form

A

AnExpertNovice

The form opens in "Browse" mode. (Me.AllowEdits = False).

The user is to select the record to be edited then click the Edit button
which, among other actions, executes the code Me.AllowEdits = True.

The form opens with disabled records hidden. I want to have a checkbox
which toggles the form filter allowing disabled records to be viewed.

This can't be done out editing a record, toggling the filter, then canceling
or saving the record.

How do I get around this!?
 
J

Joel

make a checkbox and enter the following code in the
gotfocus event and in the lost focus event:

Private Sub chkUnhide_GotFocus()

Me.AllowEdits = True

End Sub

Private Sub chkUnhide_LostFocus()

Me.AllowEdits = False
Me.Refresh

End Sub
 
A

AnExpertNovice

Elegant solution.

I had decided to toggle each field as locked/unlocked. Your solution, with
very minor modifications is so much easier.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top