Share via

Lock Form Macro

Anonymous
2016-10-10T12:39:56+00:00

Greetings. . After selecting a checkbox on form, I would like the form to become locked (no further changes in 'detail' of form), but would like header action buttons to be active/useable. Can this be achieved via macros or only VBA?  .. Or must the entire form become locked? Your macro info greatly appreciated if they exist. 

Have a great day!

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2016-10-10T14:30:37+00:00

Hi HawksWATN,

You can use macro to lock the fields if an option is selected. You may follow these steps:

  1. Right click on the Option button then select Build Event. Select Macro.
  2. You can refer on this screenshot:

As there are no lock property in the form, I suggest you use the locked property for each of the fields, to prevent modifying the values on the field once that checkbox is checked.

Let me know if you need further assistance on this.

Thanks,

Mike

Was this answer helpful?

0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2016-10-14T06:58:34+00:00

    Thanks so much Scott. I'll give it a try. Have a great day! 

    MDH

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2016-10-14T06:56:58+00:00

    Thank you very much  Michael, and for the follow up e-mail.  I'm good for now. Have a great day! 

    MDH

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2016-10-12T14:51:57+00:00

    Hi HawksWATN,

    Do you need further assistance on this? Have you tried the above suggestions?

    Thanks,

    Mike

    Was this answer helpful?

    0 comments No comments
  4. ScottGem 68,830 Reputation points Volunteer Moderator
    2016-10-10T14:54:29+00:00

    While it can be done with a macro, its very cumbersome as you have to add a macro statement for each control you want to lock. 

    I use Allen Brownes' LockBoundControlsfunction which does a great job and gives you a good deal of flexibility.

    Was this answer helpful?

    0 comments No comments