Efficiency? (1 Viewer)

Tay

likes garlic
Local time
Today, 16:18
Joined
May 24, 2002
Messages
269
I've done a quick search, but as I'm not really sure how to succinctly explain what I need to, I'm not able to find what I need. Here goes...

I have a regular group of users who need to access a db to log enquiries. Chances are, there will be three concurrent users all day, every day. Currently, they use an unsplit db which has a number of issues, so I've been tasked with replacing it.

At present, each user has to choose their name from a combo on a form for every enquiry that they log each day. There must be a way for them to enter their name just once when they open the db and the db will then 'know' that it is them so they don't have to keep choosing it every time they enter something new?

Presumably, I will have to get them to log on to the database somehow for Access to know who the user is, but then what? How can I get it to remember who they are? Especially bearing in mind that there will be simultaneous users?

If it's just a pipe dream, fair enough. But usually with Access, there seems to be a way of achieving what you need.
 

Mr. B

"Doctor Access"
Local time
Today, 10:18
Joined
May 20, 2009
Messages
1,932
I have a regular group of users who need to access a db to log enquiries. Chances are, there will be three concurrent users all day, every day. Currently, they use an unsplit db which has a number of issues, so I've been tasked with replacing it.
The first thing you need to do is split your database, putting the back-end file in a shared folder on your network. Then provide each user with their own front-end file that is saved to their hard drive. This will fix the "number of issues" that are caused by multiple users trying to work in the same file.

There are a number of ways to accomplish what you need to do about the login of users. What is the purpose of having the user to select their name before doing anything.? That really does not seem to be very appropriate. This might just take some redesign. If you need the restriction of users, you should just have type of login method for your users.
 

bwellbor

Registered User.
Local time
Today, 09:18
Joined
Sep 23, 2011
Messages
20
You could try setting up a table with each person's name and their log in name or their computer name. Access recognizes log in names with something like

user_name = Environ("username")

Computer names are recognized using something like this

Set objCompName = CreateObject("WScript.Network")
comp_name = objCompName.ComputerName

Then when the form loads or record loads (or wherever you need to put this), you could use the DLookUp function to find the person's name based on their log in name or computer name.

So,

person_name = DLookUp("[Person_Name]","tblYourTable","[LogInName] = '" & user_name & "'")

Just one way of doing it.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 08:18
Joined
Aug 30, 2003
Messages
36,137
For starters, you need to split the db:

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

I'd display a form on startup where the user chooses their name (doesn't sound like you need a formal login). Then just hide that form and display your normal startup form. You can access the value from the hidden form from anywhere in the application. There's also the Environ() function and this type of thing to get the logged in user:

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

pbaldy

Wino Moderator
Staff member
Local time
Today, 08:18
Joined
Aug 30, 2003
Messages
36,137
Geez, am I a slow typist or what?!? :p
 

MSAccessRookie

AWF VIP
Local time
Today, 11:18
Joined
May 2, 2008
Messages
3,428
If your user workstations are on a network that they need to log onto before they can use them, then there is an MS Access Function that will return the Network ID for the current user which might give you what you are looking for.

http://www.databasedev.co.uk/get_username_or_computername.html

Note that even if you have as few as TWO users that frequently or consistently share an MS Access Database, you will almost always better off to split the Database, giving each user their own copy of the Front End, and storing the Back End in a shared area. As long as you are redoing the project, making this a prioiry could eliminate potential problems in the future.
 

MSAccessRookie

AWF VIP
Local time
Today, 11:18
Joined
May 2, 2008
Messages
3,428
I was just thinking the same thing (about being slow)

In any event, it looks like you have a few quality answers to choose from.
 

Tay

likes garlic
Local time
Today, 16:18
Joined
May 24, 2002
Messages
269
Wonderful - thank you all for your replies. user_name = Environ("username")
did the trick nicely.

I always split my dbs, but others here don't - hence the problems experienced by users.
 

Users who are viewing this thread

Top Bottom