J
June
Hi
I can capture the user that is logged into my database. I would like to take that information and update the table with this person. I have already figured out how to get the current date/time. Now I just need to know how to get the person in there. Why do I want to do this? I want to do this so I know who is accessing my database so if they compain that they don't have the information that they need then I can check to see if they have looked for the information in my database
Here's my code and my table is called tblUsers with a field called Users that I want to add to
Declare Function wu_GetUserName Lib "advapi32.dll" Alias "GetUserNameA"
(ByVal lpBuffer As String, nSize As Long) As Lon
Function ap_GetUserName() As Varian
Dim strUserName As Strin
Dim lngLength As Lon
Dim lngResult As Lon
'-- Set up the buffe
strUserName = String$(255, 0
lngLength = 25
'-- Make the cal
lngResult = wu_GetUserName(strUserName, lngLength
'-- Assign the valu
ap_GetUserName = strUserNam
' Put user name into the tblUser
Thanks June
I can capture the user that is logged into my database. I would like to take that information and update the table with this person. I have already figured out how to get the current date/time. Now I just need to know how to get the person in there. Why do I want to do this? I want to do this so I know who is accessing my database so if they compain that they don't have the information that they need then I can check to see if they have looked for the information in my database
Here's my code and my table is called tblUsers with a field called Users that I want to add to
Declare Function wu_GetUserName Lib "advapi32.dll" Alias "GetUserNameA"
(ByVal lpBuffer As String, nSize As Long) As Lon
Function ap_GetUserName() As Varian
Dim strUserName As Strin
Dim lngLength As Lon
Dim lngResult As Lon
'-- Set up the buffe
strUserName = String$(255, 0
lngLength = 25
'-- Make the cal
lngResult = wu_GetUserName(strUserName, lngLength
'-- Assign the valu
ap_GetUserName = strUserNam
' Put user name into the tblUser
Thanks June