Lock form after a checkbox is check

M

Mail Merge Help

Hi

I have a form with many fields that contain project details.
I have a checkbox, to close a completed project.

Could any one help me how to write a code to lock the whole form when this
checkbox is check. Say the form name is APF_Project
ControlName is cboProjectClosed.

Thank you very much
 
J

Jack Leach

In the AfterUpdate event of the checkbox, you should be able to put this line:

Me.AllowEdits = False


This will keep the user from editing any data in existing records, but does
so for the whole form, not the record (so if you want to edit a different
record you will have to turn it back on from the OnCurrent event of the form).

Related are
Me.AllowAdditions and
Me.AllowDeletions


hth

--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 

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