Lock form after a checkbox is check

  • Thread starter Thread starter Mail Merge Help
  • Start date Start date
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
 
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)
 
Back
Top