Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Security / March 2005

Tip: Looking for answers? Try searching our database.

User can only edit own enteries

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
skulmat - 31 Mar 2005 22:41 GMT
How can I make it that a user can view enteries that that user created in the
form, but not other enteries that were created by other users.
Rick B - 31 Mar 2005 23:03 GMT
Base your form on a query and limit the records in the query.

If you records have a "createdby" field, use that to filter the records.

=CurrentUser()                    will return the current userid if you are
using User-level security

Rick B

> How can I make it that a user can view enteries that that user created in the
> form, but not other enteries that were created by other users.
tw - 31 Mar 2005 23:07 GMT
one way... and it may not be the best way because I am not all that familiar
with access...
is to add a field to your tables called userid and store currentuser() to
that field when a new record is added.  If the currentuser() is not the same
as the userid then you don't allow changes. You might also want to allow a
user in the admin group capability to make changes in case the user quits or
something.

> How can I make it that a user can view enteries that that user created in
> the
> form, but not other enteries that were created by other users.
tw - 31 Mar 2005 23:10 GMT
of course rick's idea is much better than mine you won't need any code with
his.  I'm still learning myself.

> one way... and it may not be the best way because I am not all that
> familiar with access...
[quoted text clipped - 7 lines]
>> the
>> form, but not other enteries that were created by other users.
skulmat - 31 Mar 2005 23:23 GMT
How do i tell it to not allow change sif "currentuser()" is not the same and
also how would i tell it to allow admins

> one way... and it may not be the best way because I am not all that familiar
> with access...
[quoted text clipped - 7 lines]
> > the
> > form, but not other enteries that were created by other users.
tw - 31 Mar 2005 23:50 GMT
Check out rick's suggestion, it's better than mine.
currentuser() will only work if security is set up otherwise currentuser
will always be admin.

If you set up security, each user will have their own userid.  That can be
determined by the currentuser() function.  Save that data to a field in your
table.  When you run a query use as a parameter the field in your table must
equal the currentuser().  Use a form to access the data, and don't give
access to the original table.  A user with admin permissions can change a
userid for a user that quits to a user that is still ther if necessary, that
can be done in a query also.

> How do i tell it to not allow change sif "currentuser()" is not the same
> and
[quoted text clipped - 16 lines]
>> > the
>> > form, but not other enteries that were created by other users.
 
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.