Disable Editing of Fields For Certain Users

R

Rob

Is it possible, when adding a new contact, to a custom made contact form, to
disable certain fields i.e. a contacts address, so that certain staff members
within a company cannot alter these details.

Can anyone help?
 
S

Sue Mosher [MVP-Outlook]

Actually, you can, pretty reliably (never 100%, of course) by using code that blocks in-cell editing -- see the discussion from last month at http://www.outlookcode.com/threads.aspx?forumid=3&messageid=25844. The other piece that would be needed in Rob's scenario would be to expand the Item_Open event handler to check the value of Application.Session.CurrentUser and then make controls editable as appropriate. (You'd want all the controls to be read-only on the published form.) The article at http://www.outlookcode.com/article.aspx?ID=38 covers working with control properties.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 
E

Eric Legault [MVP - Outlook]

That's a good method, I agree. I guess I always look deeper than necessary
when I think about securing an Outlook form. A truly secure form would have
to evaluate the user against managed permission levels and group
memberships - all of which is way too complicated to build from scratch and
not feasible for Outlook forms.

But a simple - "oh, you're UserA - lock these fields; otherwise, go nuts" is
perfectly doable as you say.

Eric


Actually, you can, pretty reliably (never 100%, of course) by using code
that blocks in-cell editing -- see the discussion from last month at
http://www.outlookcode.com/threads.aspx?forumid=3&messageid=25844. The other
piece that would be needed in Rob's scenario would be to expand the
Item_Open event handler to check the value of
Application.Session.CurrentUser and then make controls editable as
appropriate. (You'd want all the controls to be read-only on the published
form.) The article at http://www.outlookcode.com/article.aspx?ID=38 covers
working with control properties.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 
S

Sue Mosher [MVP-Outlook]

I agree. A truly secure solution also wouldn't store any data in the folder that shouldn't be available to public view. It would keep everything else in a second folder or an external database.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


Eric Legault said:
That's a good method, I agree. I guess I always look deeper than necessary
when I think about securing an Outlook form. A truly secure form would have
to evaluate the user against managed permission levels and group
memberships - all of which is way too complicated to build from scratch and
not feasible for Outlook forms.

But a simple - "oh, you're UserA - lock these fields; otherwise, go nuts" is
perfectly doable as you say.

Eric


Actually, you can, pretty reliably (never 100%, of course) by using code
that blocks in-cell editing -- see the discussion from last month at
http://www.outlookcode.com/threads.aspx?forumid=3&messageid=25844. The other
piece that would be needed in Rob's scenario would be to expand the
Item_Open event handler to check the value of
Application.Session.CurrentUser and then make controls editable as
appropriate. (You'd want all the controls to be read-only on the published
form.) The article at http://www.outlookcode.com/article.aspx?ID=38 covers
working with control properties.
 
R

Rob

Many Thanks all, for your help and advice on this matter I will look into all
suggestions made further.

Rob
 

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