My Assistant
![]() ![]() |
|
|
Aug 5 2004, 09:18 AM
Post
#1
|
|
|
UtterAccess Addict Posts: 131 |
I am using the following function
Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _ "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long Function bisOSUserName() As String ' Returns id of Logged in User Dim lngLen As Long, lngX As Long Dim strUserName As String ' strUserName = String$(254, 0) lngLen = 255 lngX = apiGetUserName(strUserName, lngLen) If lngX <> 0 Then bisOSUserName = Left(strUserName, lngLen - 1) Else bisOSUserName = "" End If End Function I am wondering if I have a table of username or a table with pc logon is there another function that could use bisOSUserName() that when a person tries to enter the db would let them in if their login is in the table or would if they are not in the table would shut the db down or kick them out and display a message before shuting down that they need to contact the system administrator |
|
|
|
Aug 5 2004, 09:24 AM
Post
#2
|
|
|
UdderAccess Admin + UA Ruler Posts: 15,669 From: Upper MI |
|
|
|
|
Aug 5 2004, 09:55 AM
Post
#3
|
|
|
UtterAccess Addict Posts: 131 |
thanks CyberCow, Looks pretty like what I could use. Can I modify it a little bit to suit our needs?
sorry it took so long to get back with you I was going thru it. |
|
|
|
Aug 5 2004, 10:38 AM
Post
#4
|
|
|
UdderAccess Admin + UA Ruler Posts: 15,669 From: Upper MI |
Of course you can modify it! (IMG:http://www.utteraccess.com/forum/style_emoticons/default/frown.gif)
Glad I could help. |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 23rd May 2013 - 08:52 PM |