Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old May 15th, 2002, 05:45 PM
mario.a.nunes mario.a.nunes is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2002
Location: Porto,Portugal
Posts: 10 mario.a.nunes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Msaccess + Nt4 + Current User

I am writing an MSACCESS 2000 application.

Does anyone know how to get the current NT4 user logged in?

Thanks.

Last edited by mario.a.nunes : May 15th, 2002 at 05:48 PM.

Reply With Quote
  #2  
Old July 5th, 2002, 02:09 PM
CodeWarrior CodeWarrior is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Oakville - Ontario - Canada
Posts: 12 CodeWarrior User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to CodeWarrior Send a message via AIM to CodeWarrior
The following code should help.

Option Compare Database
Private S1 As String

Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Public Function FindUserName() As String
' Function that returns the name of the currently logged on user
' Example - MyString = FindUserName
S1 = Space(512)
GetUserName S1, Len(S1)
FindUserName = Trim$(S1)

End Function

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Msaccess + Nt4 + Current User


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway