A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Protecting a field within a form



 
 
Thread Tools Display Modes
  #1  
Old February 3rd, 2006, 05:10 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Protecting a field within a form

I am new to the security part of this but I see that you can restrict groups
to update a table. Is there any way that based upon a signon that you can
restrict a particular field unless the user has certain permissions?
  #2  
Old February 4th, 2006, 03:49 AM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Protecting a field within a form

On Fri, 3 Feb 2006 09:10:44 -0800, "sonfitz"
wrote:

I am new to the security part of this but I see that you can restrict groups
to update a table. Is there any way that based upon a signon that you can
restrict a particular field unless the user has certain permissions?


Only by denying everyone (except developer/administrators) any access
to the table entirely; instead, provide them with only Forms to update
the table, and set the Locked properties of the controls you want
restricted to Yes.

John W. Vinson[MVP]
  #3  
Old February 4th, 2006, 06:42 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Protecting a field within a form

On Fri, 03 Feb 2006 20:49:26 -0700, John Vinson
wrote:

On Fri, 3 Feb 2006 09:10:44 -0800, "sonfitz"
wrote:

I am new to the security part of this but I see that you can restrict groups
to update a table. Is there any way that based upon a signon that you can
restrict a particular field unless the user has certain permissions?


Only by denying everyone (except developer/administrators) any access
to the table entirely; instead, provide them with only Forms to update
the table, and set the Locked properties of the controls you want
restricted to Yes.


RWOP queries? - or maybe I'm missing the point.

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.

  #4  
Old February 4th, 2006, 10:57 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Protecting a field within a form

On Sat, 04 Feb 2006 18:42:17 +0000, John Nurick
wrote:

RWOP queries? - or maybe I'm missing the point.


Can you set a RWOP query to allow one field to be edited and another
to be protected, in the same query? That would be neat but I don't
know how!

John W. Vinson[MVP]
  #5  
Old February 5th, 2006, 07:16 AM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Protecting a field within a form

On Sat, 04 Feb 2006 15:57:58 -0700, John Vinson
wrote:

On Sat, 04 Feb 2006 18:42:17 +0000, John Nurick
wrote:

RWOP queries? - or maybe I'm missing the point.


Can you set a RWOP query to allow one field to be edited and another
to be protected, in the same query? That would be neat but I don't
know how!


I read - or misread - the OP as wanting to restrict visibility rather
than updatability...

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.

  #6  
Old February 6th, 2006, 10:08 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Protecting a field within a form

I appreciate your suggestions although that did work I need to have the
ability to modify the field within this form if the person has sufficent
permissions. The field I want to ba able to modify if the person has the
right is a drop down combo box.

I tried creating another table and created a form based upon that new table
which just had one field in it. That field was a drop down combo box that I
added two peices of info. In my main form I created a subform area to
display this one field and I have not had much luck in getting the info to
display corretly. I just want to be able to limit that drop down box to who
can modify and who can only view the data while being able to modify the
other fields in the form.


"John Nurick" wrote:

On Sat, 04 Feb 2006 15:57:58 -0700, John Vinson
wrote:

On Sat, 04 Feb 2006 18:42:17 +0000, John Nurick
wrote:

RWOP queries? - or maybe I'm missing the point.


Can you set a RWOP query to allow one field to be edited and another
to be protected, in the same query? That would be neat but I don't
know how!


I read - or misread - the OP as wanting to restrict visibility rather
than updatability...

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.


  #7  
Old February 7th, 2006, 09:14 AM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Protecting a field within a form

I don't understand the purpose of your new table.

To meet the situation you originally explained, ignore my previous posts
and follow John Vinson's suggestion: set things up so the users can only
access the data via your forms, and on the forms lock the controls that
display the fields you don't want the users to be able to modify.

To lock or unlock the controls depending on the user, you have to use
VBA code in the form's Open event procedure that gets the user name,
checks their permissions, and adjusts the Locked property of the
controls accordingly.

On Mon, 6 Feb 2006 14:08:28 -0800, "sonfitz"
wrote:

I appreciate your suggestions although that did work I need to have the
ability to modify the field within this form if the person has sufficent
permissions. The field I want to ba able to modify if the person has the
right is a drop down combo box.

I tried creating another table and created a form based upon that new table
which just had one field in it. That field was a drop down combo box that I
added two peices of info. In my main form I created a subform area to
display this one field and I have not had much luck in getting the info to
display corretly. I just want to be able to limit that drop down box to who
can modify and who can only view the data while being able to modify the
other fields in the form.


"John Nurick" wrote:

On Sat, 04 Feb 2006 15:57:58 -0700, John Vinson
wrote:

On Sat, 04 Feb 2006 18:42:17 +0000, John Nurick
wrote:

RWOP queries? - or maybe I'm missing the point.


Can you set a RWOP query to allow one field to be edited and another
to be protected, in the same query? That would be neat but I don't
know how!


I read - or misread - the OP as wanting to restrict visibility rather
than updatability...

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.



--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.

  #8  
Old February 13th, 2006, 02:16 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Protecting a field within a form

John you hit on what I'm trying to do however, I'm not familar with VBA code
to accomplish this. Could you point me to where I could find the info on how
to plug the proper VBA code into the Open Event procedure. This would
accomplish what I'm trying to do which again is to limit who can modify and
who can only view a particular field, in this case a drop down combo-box,
within the form.

Thanks ahead of time for your help.

Jay

"John Nurick" wrote:

I don't understand the purpose of your new table.

To meet the situation you originally explained, ignore my previous posts
and follow John Vinson's suggestion: set things up so the users can only
access the data via your forms, and on the forms lock the controls that
display the fields you don't want the users to be able to modify.

To lock or unlock the controls depending on the user, you have to use
VBA code in the form's Open event procedure that gets the user name,
checks their permissions, and adjusts the Locked property of the
controls accordingly.

On Mon, 6 Feb 2006 14:08:28 -0800, "sonfitz"
wrote:

I appreciate your suggestions although that did work I need to have the
ability to modify the field within this form if the person has sufficent
permissions. The field I want to ba able to modify if the person has the
right is a drop down combo box.

I tried creating another table and created a form based upon that new table
which just had one field in it. That field was a drop down combo box that I
added two peices of info. In my main form I created a subform area to
display this one field and I have not had much luck in getting the info to
display corretly. I just want to be able to limit that drop down box to who
can modify and who can only view the data while being able to modify the
other fields in the form.


"John Nurick" wrote:

On Sat, 04 Feb 2006 15:57:58 -0700, John Vinson
wrote:

On Sat, 04 Feb 2006 18:42:17 +0000, John Nurick
wrote:

RWOP queries? - or maybe I'm missing the point.


Can you set a RWOP query to allow one field to be edited and another
to be protected, in the same query? That would be neat but I don't
know how!

I read - or misread - the OP as wanting to restrict visibility rather
than updatability...

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.



--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.


  #9  
Old February 13th, 2006, 09:58 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Protecting a field within a form

Here's a function (there are many versions around) which tells you
whether or not a user is in a given security group:

Public Function IsUserInGroup(strGroup As String, _
strUser As String) As Boolean

Dim Dummy As String
On Error Resume Next
Dummy = DBEngine(0).Users(strUser).Groups(strGroup).Name
IsUserInGroup = (Err.Number = 0)
Err.Clear
On Error GoTo 0
End Function

If you stick it in a module (a standard module, not a class module or a
form's module) you can do stuff like this in a form's Open event
procedu

If IsUserInGroup("MoltoAdministroso", CurrentUser()) Then
cboImportantStuff.Locked = False
Else
cboImportantStuff.Locked = True
End If





On Mon, 13 Feb 2006 06:16:27 -0800, "sonfitz"
wrote:

John you hit on what I'm trying to do however, I'm not familar with VBA code
to accomplish this. Could you point me to where I could find the info on how
to plug the proper VBA code into the Open Event procedure. This would
accomplish what I'm trying to do which again is to limit who can modify and
who can only view a particular field, in this case a drop down combo-box,
within the form.

Thanks ahead of time for your help.

Jay

"John Nurick" wrote:

I don't understand the purpose of your new table.

To meet the situation you originally explained, ignore my previous posts
and follow John Vinson's suggestion: set things up so the users can only
access the data via your forms, and on the forms lock the controls that
display the fields you don't want the users to be able to modify.

To lock or unlock the controls depending on the user, you have to use
VBA code in the form's Open event procedure that gets the user name,
checks their permissions, and adjusts the Locked property of the
controls accordingly.

On Mon, 6 Feb 2006 14:08:28 -0800, "sonfitz"
wrote:

I appreciate your suggestions although that did work I need to have the
ability to modify the field within this form if the person has sufficent
permissions. The field I want to ba able to modify if the person has the
right is a drop down combo box.

I tried creating another table and created a form based upon that new table
which just had one field in it. That field was a drop down combo box that I
added two peices of info. In my main form I created a subform area to
display this one field and I have not had much luck in getting the info to
display corretly. I just want to be able to limit that drop down box to who
can modify and who can only view the data while being able to modify the
other fields in the form.


"John Nurick" wrote:

On Sat, 04 Feb 2006 15:57:58 -0700, John Vinson
wrote:

On Sat, 04 Feb 2006 18:42:17 +0000, John Nurick
wrote:

RWOP queries? - or maybe I'm missing the point.


Can you set a RWOP query to allow one field to be edited and another
to be protected, in the same query? That would be neat but I don't
know how!

I read - or misread - the OP as wanting to restrict visibility rather
than updatability...

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.



--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.



--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating a field on a subfrom from a field on its master form FatMan Using Forms 4 January 25th, 2006 10:14 PM
Memo Field Sam General Discussion 12 November 10th, 2005 09:16 PM
Need Help In Printing Current Record in Specific Report RNUSZ@OKDPS Setting Up & Running Reports 1 May 16th, 2005 09:06 PM
If I create a form with the wizard and later decide I need to add another field do I have to re-create the form? Mister John Doe Using Forms 3 January 2nd, 2005 06:17 AM
copying value from subform field to main form field VNoelDavis Using Forms 0 January 1st, 2005 09:45 PM


All times are GMT +1. The time now is 12:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.