Re: User-level Restriction

From: Maria K (MariaK_at_discussions.microsoft.com)
Date: 06/29/04


Date: Tue, 29 Jun 2004 11:29:01 -0700

Hi Joan,

I just wanted to let you know that your suggestions worked! Thank you so much. Also, to answer your question to #3, the form will launch based on the Username. (I have two different forms for each department.)

Thanks again for your help -- I truly appreciate it.

Maria

"Joan Wild" wrote:

> Hi Maria,
>
> Maria K wrote:
> > 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.
>
>
> --
> Joan Wild
> Microsoft Access MVP
>
>
>



Relevant Pages

  • RE: Filter Query by Year on a form
    ... If the check box does not affect what data are retrieved by the query, ... launch several different reports. ... it will launch that particular report say material cost report or ... If the user enters a year in the from year control and nothing in the to ...
    (microsoft.public.access.queries)
  • RE: Filter Query by Year on a form
    ... launch several different reports. ... it will launch that particular report say material cost report or ... If the user enters a year in the from year control and nothing in the to ... The report query will look at the form and see if the ...
    (microsoft.public.access.queries)
  • Re: Error when running Query, but not Report
    ... I'm not seeing anything in the query that you posted nor in the process ... > I use a switchboard to launch the reports in the report section of the DB. ...
    (microsoft.public.access.queries)
  • Re: Using VBA To Write (Print) To Screen (Printer)
    ... report from a query on that table, ... here how the code would launch ANY report in your appcation, ... to that temp table of ID's you created. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Display result of combo box selection on form?
    ... you need 3 copies of tblUsers. ... >>>>>Currently, on frmBugs, for the field CreatedBy, the user selects from ... >>>> both the main table the report is currently based on AND ... All three tables are in the query. ...
    (microsoft.public.access.reports)

Loading