PC Review


Reply
Thread Tools Rate Thread

Database with Multiple Users

 
 
smritzer
Guest
Posts: n/a
 
      18th Jan 2010
I am trying to create a database that has the potential for many users. I
recently learned how to set securities and passwords for the database, but I
still can't figure out one thing: Is there a way to have a database with
multiple users, but restrict what each person sees?
The way my database is set up now, all information is stored in a table, and
the user would fill out the form to enter their information. These users
will also have the ability to edit their information later. On both the
table and the form, however, other users can still see all of the
information, which is something I am trying to avoid. I am hoping that each
user can only see their information.
I have tried searching for different ways of doing this, but haven't come up
with anything. Maybe I'm using the wrong search terms.
Any help would be greatly appreciated.
 
Reply With Quote
 
 
 
 
Dirk Goldgar
Guest
Posts: n/a
 
      18th Jan 2010
"smritzer" <(E-Mail Removed)> wrote in message
news:685F8FA4-B940-4F3D-8B8C-(E-Mail Removed)...
>I am trying to create a database that has the potential for many users. I
> recently learned how to set securities and passwords for the database, but
> I
> still can't figure out one thing: Is there a way to have a database with
> multiple users, but restrict what each person sees?
> The way my database is set up now, all information is stored in a table,
> and
> the user would fill out the form to enter their information. These users
> will also have the ability to edit their information later. On both the
> table and the form, however, other users can still see all of the
> information, which is something I am trying to avoid. I am hoping that
> each
> user can only see their information.
> I have tried searching for different ways of doing this, but haven't come
> up
> with anything. Maybe I'm using the wrong search terms.
> Any help would be greatly appreciated.



Are you using user-level (workgroup) security? If so, the CurrentUser()
function returns the user-name of the person who logged into the database.
You can set up your tables -- those that need this protection -- to have a
text field, UserName, and have a (possibly hidden) text box on the related
form(s) that is bound to that field and has its Default Value property set
to CurrentUser(). Also, if you create records in code, you must see to it
that the UserName field is set to the value of CurrentUser().

You would also create queries that filter records to return only those
records where UserName = CurrentUser(), and use those queries as the
recordsources of your forms and reports. That way, each user only ever sees
those records that are related to them. You should hide the tables
themselves so that the user can't get at them, and revoke the users'
permissions on the tables, giving them only permissions on the restricting
queries.

Does that clarify the approach for you?

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)

 
Reply With Quote
 
Keith Wilby
Guest
Posts: n/a
 
      18th Jan 2010
"smritzer" <(E-Mail Removed)> wrote in message
news:685F8FA4-B940-4F3D-8B8C-(E-Mail Removed)...
>I am trying to create a database that has the potential for many users. I
> recently learned how to set securities and passwords for the database, but
> I
> still can't figure out one thing: Is there a way to have a database with
> multiple users, but restrict what each person sees?
> The way my database is set up now, all information is stored in a table,
> and
> the user would fill out the form to enter their information. These users
> will also have the ability to edit their information later. On both the
> table and the form, however, other users can still see all of the
> information, which is something I am trying to avoid. I am hoping that
> each
> user can only see their information.
> I have tried searching for different ways of doing this, but haven't come
> up
> with anything. Maybe I'm using the wrong search terms.
> Any help would be greatly appreciated.


Yes you can do that but you would need a method to record each user's
identity against their records. One way to do this is to store the user's
network ID when the record is created. Here's some code that will return
that ID, you could call it from your form's Before Update event:

http://www.mvps.org/access/api/api0008.htm

You could then filter on the user ID field in the form's Open event.

BTW don't forget to split your app for multi-user access. Here's why:

http://www.granite.ab.ca/access/splitapp/index.htm

HTH - Keith.
www.keithwilby.co.uk

 
Reply With Quote
 
smritzer
Guest
Posts: n/a
 
      19th Jan 2010
Thank you for your assistance, I will try these things out.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple users in a database. jcontrer Microsoft Access 1 23rd Jan 2008 04:44 AM
Database With Multiple Users =?Utf-8?B?Q3VydGlzIFN0ZXZlbnM=?= Microsoft Access Database Table Design 1 10th May 2007 06:32 PM
Multiple Database users =?Utf-8?B?SmFuaW5l?= Microsoft Access 3 9th Aug 2006 09:40 PM
One database - multiple users? =?Utf-8?B?SmF2YW51dHo=?= Microsoft Access 3 12th Aug 2005 09:29 PM
what database should be used for multiple users =?Utf-8?B?c3BhcmtsZV92eQ==?= Microsoft Access 2 1st Apr 2005 12:44 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:41 AM.