lock/unlock (1 Viewer)

deepbreath

Registered User.
Local time
Today, 15:18
Joined
Apr 18, 2001
Messages
73
can i put a button on from that helps to lock and unlock the form for viewing or editing data. i.e if i press once it displays view only and one can only view the data, if i press again it asks some password and then displays edit and allow the editing.
is there any other method to accomplish the same.
really appreaciate if some one can help.
thanks
 

Matthew Snook

NW Salmon Database
Local time
Today, 15:18
Joined
Apr 19, 2001
Messages
133
I have used the "Locked" and "Enabled" properties of various controls to do something similar. In the "click" event of your button, put

Me!ControlName.Enabled = False
or
Me!ControlName.Locked = True

to lock the named controls, or the opposite to unlock them. If you use just the "enabled" property, then the control will be grayed out.

Somebody posted a method, which I haven't had time to try, of assigning all pertinent controls to a group, then changing the properties within the group. This would shorten the code since you'd only have to enable and lock the group, not each individual control. Worth looking into...

Matt
 

Users who are viewing this thread

Top Bottom