By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,790 Members | 1,398 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,790 IT Pros & Developers. It's quick & easy.

how to know which is the current user logged on access project

P: n/a
hi, hope somebody could help me with this, have some users created on an
sql 2000, and am trying to know which user opened the adp , so everytime
i put msgobx currentuser it gives me admin, though it isn't connected
thru admin......thx

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Joe Saliba" <jo*******@hotmail.com> wrote in message
news:41**********************@news.newsgroups.ws.. .
hi, hope somebody could help me with this, have some users created on an
sql 2000, and am trying to know which user opened the adp , so everytime
i put msgobx currentuser it gives me admin, though it isn't connected
thru admin......thx


CurrentUser() returns the current "Access User-Level Security User". If you
haven't implemented user-level security then all users are logged in as the
default user "Admin".

The "Access Web" has example code for retrieving the Windows Networking logon
name. Perhaps that is what you are looking for.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2

P: n/a

"Joe Saliba" <jo*******@hotmail.com> wrote in message
news:41**********************@news.newsgroups.ws.. .
hi, hope somebody could help me with this, have some users created on an
sql 2000, and am trying to know which user opened the adp , so everytime
i put msgobx currentuser it gives me admin, though it isn't connected
thru admin......thx

Sub getCurrentUser()

Dim rst As ADODB.Recordset
Dim s As String

s = "select suser_sname()"
Set rst = New ADODB.Recordset
rst.Open s, CurrentProject.Connection, adOpenForwardOnly,
adLockReadOnly, adCmdText
Debug.Print "Current User is " & rst.Fields(0).Value
rst.Close
Set rst = Nothing

End Sub
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.