User-level Restriction

G

Guest

I'm developing a database that is highly confidential. I've created it so that each user logging into the database will require a logon name and pw. Here's what I would like for it to do as well:

1. The logon name is the user's initials. (I've set it up this way already.)
2. Have the initials that were entered at the logon prompt automatically populate into the name field of a form.
3. Appropriate form will launch based on the user's initials. (optional, but preferred.)
4. The user can ONLY view the records they've entered when generating a report. Again, this will be based on their initials at the logon prompt. (I don't want to have to prompt them to enter their initials again at the query level. To me, this defeats the purpose of a user-level password protected database.)

Any suggestions would be greatly appreciated and thanks for your time in reading this.

Thanks again,
Maria
 
J

Joan Wild

Hi Maria,

Maria said:
I'm developing a database that is highly confidential. I've created
it so that each user logging into the database will require a logon
name and pw. Here's what I would like for it to do as well:

1. The logon name is the user's initials. (I've set it up this way
already.)
2. Have the initials that were entered at the logon prompt
automatically populate into the name field of a form.

Set the default property for the control on the form to
=CurrentUser()
Also advisable to either lock the control or make it invisible, so users
don't tamper.
3. Appropriate form will launch based on the user's initials.
(optional, but preferred.)

You can determine who is the CurrentUser() and then open the appropriate
form, but you need to provide more details. I would think that everyone
uses the same form, but you only want them to edit add their own records -
you can accomplish this by using a query as the record source, and setting
the criteria for the 'CreatedBy' field to CurrentUser(). Or if they only
need to add records, just set the Data Entry property for the form to True.
Also is the form launched based on the username or on the security group
they are a member of?
4. The user can ONLY view the records they've entered when
generating a report. Again, this will be based on their initials at
the logon prompt. (I don't want to have to prompt them to enter
their initials again at the query level. To me, this defeats the
purpose of a user-level password protected database.)

The record source for your report needs to be a query where the criteria for
the 'CreatedBy' field is set to CurrentUser().

This assumes that you add a CreatedBy field to your table(s). As long as
all data entry is via your form, this field will be populated with the
username of the person who created the record. Then your queries for the
reports/forms will restrict things to just that user.
 
G

Guest

Hi Joan,

Thank you so much for your quick response! I will try your suggestions.

Thanks,
Maria
 

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