Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2008

Tip: Looking for answers? Try searching our database.

Locking form fields in a protected Word template (Word 2003)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lenny - 26 Mar 2008 22:57 GMT
I am setting up a performance review form where the supervisor selects a
rating from a dropdown and can add comments in a table cell directly below
based on the performance criteria.

There is a section for the employees responses.

Is there a way to programatically lock down the fields in the supervisor
section so the employee cannot change any of the comments or ratings?

I have section breaks dividing the various inputs into protected and
unprotected sections to allow for the use of spell check.

Best regards... Lenny
macropod - 26 Mar 2008 23:14 GMT
Hi Lenny,

You could use an auto macro to test the username and, if it:
. is not the supervisor's username, the macro could turn off the "fill-in enabled" property for the supervisor-only fields.
. is the supervisor's username, the macro could turn on the "fill-in enabled" property for the supervisor-only fields.
You'd need to have the supervisor's username hard coded or stored in the document properties.

You could also use the same technique to lock supervisors out of the employee-comment areas too. Coded correctly, only the employee
and their supervisor would be able to make any edits - others would effectively have read-only access only.

Cheers
Signature

macropod
[MVP - Microsoft Word]
-------------------------

>I am setting up a performance review form where the supervisor selects a
> rating from a dropdown and can add comments in a table cell directly below
[quoted text clipped - 9 lines]
>
> Best regards... Lenny
Lenny - 26 Mar 2008 23:43 GMT
Hello macropod!
Could I code the 'lockdown' generically?  As in thru a checkbox entry macro
and how would the code look?  i.e., " [ ] Secure section here"  also probably
another checkbox to unlock for edits?  I love your simple solution.... and
here is the 'but'

There are way too many supervisors / employees to 'hardwire' in usernames

regards Lenny

> Hi Lenny,
>
[quoted text clipped - 20 lines]
> >
> > Best regards... Lenny
macropod - 27 Mar 2008 02:04 GMT
Hi Lenny,

There is no need to code an on-entry macro for each field individually. If the auto open macro approach is taken, you could code the
form so that all fields are locked by default. That would deny access to those fields if the 'clever' user thought they could get
around things by disabling the macro. After checking the username, the macro would then automatically unlock the 'supervisor' or
'subordinate' fields, as appropriate.

Some alternatives to hard-coding the 'supervisor' usernames:
. have the system admin maintain a text file with the 'supervisor' usernames in a location that other employees can at most get
read-only access to. Your macro would then compare the user's username against that list to determine the access level. Your
reference file doesn't need to know about all employees - only 'supervisors' (which I imagine are far fewer than 'subordinates').
. have an auto macro pop up a dialogue box for a password. If a valid password is input, 'supervisor' access is given; otherwise
'subordinate' access is given. This way, you'd have to give all the supervisors the password, and that creates its own problems (eg
what to do if a 'subordinate' is put in a 'supervisor' position for a time, before reverting to 'subordinate').

Cheers
Signature

macropod
[MVP - Microsoft Word]
-------------------------

> Hello macropod!
> Could I code the 'lockdown' generically?  As in thru a checkbox entry macro
[quoted text clipped - 31 lines]
>> >
>> > Best regards... Lenny
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.