Simple Windows user identification

kodiak385

is using THE INTERNET!!1
Local time
Today, 01:13
Joined
Jan 25, 2007
Messages
31
Okay, so I know there is a TON of stuff in this forum alone on how to secure an Access database based on Windows login information, and so I apologize for adding to the clutter out there, but that's actually the problem -- I can't seem to find exactly what I need among the threads and threads of related info.

What I'm looking for is the most simple, basic way to identify which Windows user is accessing the database. I'm NOT looking to actually SECURE the database (yet), I just want to see who's using it, and display information pertaining to that specific user (for one example, a personalized greeting upon opening, among other things).

To keep this in simplest terms, is there a single function that will identify a windows login? If not, what is the simplest way to find it, preferably without enabling Access security?

Thanks
 
I think you are wanting the following
Code:
environ("username")
 
Actually, that brings up another issue...

pbaldy - thank you for your help, again :)

I pasted that code into a module, and it works like a charm. Thanks a ton.

As far as the Environ("username") solution goes, I was previously aware of this, but I'm having two issues with it. First, if I'm logged in, it simply returns "Admin," which I guess could work, but seems a little too generic (from what I understand, it's possible to have multiple users set as "admin," and who is admin can also change). Second, and more importantly for me, lately it's been simply triggering a "Enter Parameter Value" prompt asking for a value for Environ, and returning the #Name? error in the control in which it's used. No bueno. It used to work, but now seems to just be kaput. No idea what changed. :confused:

I'll be using Dev Ashish's code for this specific purpose, but even if I'm not using the Environ function, I'm actually getting similar symptoms (for other users, on other computers) for other functions that I KNOW are available -- things like Date() or Format(). What's worse is that on one of them (a fairly basic report), it's displaying a blank report and actually refusing to close. This is, as you can imagine, extremely frustrating. :mad: The other two users are also using Access 2003, so it shouldn't be a version issue, but I don't know what else it could be.

I know this is really taking a turn onto another topic - should I repost this as a new thread? Either way, if someone knows what's up, I'd reeeeeally like some help. Thanks.
 
Egads!!

:eek: HOLY FLYING MONKEYS THANK YOU SO MUCH!!


That was driving me CRAZY! It took some messing around, but I figured out that I had to unreference a few random libraries that were somehow inadvertently referenced, and it WORKS now! :D

Dude, if you were closer, I would hug you. haha
 
Well, I'll be driving up that way next month, but my wife is going to have some issues with unauthorized hugging. :p

Glad we got it sorted out.
 

Users who are viewing this thread

Back
Top Bottom