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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Current User?

Status
Not open for further replies.

RicRom

Programmer
Jun 9, 2004
6
NL
Hi People,

Back in the 'old days' in an access MDB I could use currentuser() to get the users login name..
Now I'm using SQL with an ADP.. and I know that there is something like SUSER_SNAME() but lets say I want a messagebox with the username.. then how would I do that?? thanks... and please be gentle ; im a n00b :)

Richard
 
Could be a bit iffy...

(suser_name()) - Returns the name of the current User as logged in to SQL.

faq705-2814 - Returns the name of the current User as logged in to Windows 2000.

If Access is using Windows for security, you're all set. However, if you're using Access security the names returned could be different...

Good Luck!
Bob
 
Thanks Bob,

I guess I can use the Win2000 Logged user...
b.t.w.: It isn't possible to use access security in an ADP right?!?

Richard
 
hi

if I understand well you want to know who is current user on sql server and if you are working in adp then try using this

MsgBox CurrentProject.Connection.Properties("User Id")

I hope that I help you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top