Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting up user heirachy, security

Status
Not open for further replies.

bookenz

Programmer
Apr 17, 2005
16
AU
I am creating a Data Base for a customer management system.

It will allow users to log customer requests.

It will have multiple user access. Users belong to teams (eg. Team 1: Accounts payable; Team 2: Accounts recievable; etc.).

I have a table called "tblRequests" containing:
1. Request ID
2. Request description
3. User

I have thought of using Access Security to allow users to log into the system using a password.

My question is:

1. how to best "get" the user into the "User" field in tblRequests when a request is created?

and...
2. how do display requests grouped by team?

 
Using security is a good thing, but this is an advanced topic. You can use the Access Help to get started.

Microsoft has some pretty good documentation...
ACC: Microsoft Access Security FAQ Available in Download Center

And another link
Microsoft Access Passwords, Workgroups and ADO

...But I think you need to work on some basics first...
how to best "get" the user into the "User" field...

First, you create a form, and do not work directly at the table level. When you create a form, you can control the "tab-through" movement by right-clicking on the form in design view, and then move the controls up and down in the list to arrange the order.

how do display requests grouped by team
You can use the SELECT ... FROM ... GROUP BY...
User the query builder to develop your and test your queries.

But make sure your design is "normalized". Otherwise, pulling data as information may be tough.

Richard
 
Thanks Richard for the links. I need to clarify:

Quote:'how to best "get" the user into the "User" field'

What I mean is: when the user creates a new request in tblRequests, I want the "User" field to (automatically) capture (display) the name of the user as logged into the database. Is there any coding that will do this?

cheers
 
In the BeforeInsert or BeforeUpdate event procedure of the form:
Me![user field] = Application.CurrentUser

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Another useful tool is
Code:
Dim strUser as String, strComputer as String

strUser = environ("username")
'and if you want to now the computr name beng used
strComputer = environ("computername")
'....
Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top