PDA

View Full Version : Microsoft Accesss - Getting name of current user.



Silentlord
08-02-2003, 10:05 AM
Hi group...

I'm relatively new at this - learning as I go along...

I'm writing a database for use at work. It will be used by a small group of
employees to track issues within the company.

Part of the data I need to record, is the user name of the employee entering
the data. The company uses a Windows 2000 network. I know I can (at least
I think I can, like I said, I'm new at this...) use an MS Access work
group, and require uses to logon to that when they use the database, and then
I can use the 'currentuser()' function to log their name, but this poses a
few problems, in that I would need to pre-define all the user who will be
using the database.

Is there a way of entering a function within a form, to get the user name
that the employee has used to logon to the network, thereby avoiding the
need to setup a workgroup.

I hope this makes sense to someone, and that that person can help me out
somehow....

Much appreciated....

Richard.

Merlin
08-02-2003, 11:32 AM
Create a table for users and link to a field in the tables that require that info.
Split the database database
Leave the backend on a server or other central location

In the front end create a logon form from the table for users.
Use the logon name as a hidden field in each form and output to the field in the tables that require that info.

Install the frontend on each client machine, mapping to the backend database



What you want depends on whether the last user who modified the record is required or if all users who modify the record are required.



Another way is to secure the database and use different account levels. Your vagueness inticates your inexperience so that will be beyond you at this stage. Have a look here:
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B254372

parry
08-02-2003, 04:04 PM
This code may also be useful... http://www.mvps.org/access/api/api0008.htm