S
sherwin verdun
i wanted to know who logged in into the database for access 2003. any help?
sherwin verdun said:i wanted to know who logged in into the database for access 2003. any help?
Keith Wilby said:The simplest method IMO is to use the "Environ" property. This is frowned
upon by many developers because the property can be modified by savvy
users, but you have to ask yourself how likely is that to happen in your
domain.
Douglas J. Steele said:As to using the Environ property to get the user id of the current user,
while I agree that the possibility of abusing it is remote, using the API
call is pretty simple, so I don't understand not doing it correctly. <g>
http://www.mvps.org/access/api/api0008.htm
Douglas J. Steele said:Your code sample is incomplete: it's missing the declaration of
apiGetComputerName, which is:
Private Declare Function apiGetComputerName Lib "kernel32" Alias _
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
That must be put at the beginning of the same module where you've placed
fOSMachineName.
BTW, that code came from http://www.mvps.org/access/api/api0009.htm at
"The Access Web". You obviously chose to ignore the copyright information
when you copied it!
' This code was originally written by Dev Ashish.
' It is not to be altered or distributed,
' except as part of an application.
' You are free to use it in any application,
' provided the copyright notice is left unchanged.
'
' Code Courtesy of
' Dev Ashish