Hi!
On an openform event, i get the userId with the following code:
Dim sUser As String
Dim sComputer As String
Dim lpBuff As String * 1024
'Get the Login User Name
GetUserName lpBuff, Len(lpBuff)
sUser = Left$(lpBuff, (InStr(1, lpBuff, vbNullChar)) - 1)
lpBuff = ""
'Get the Computer Name
GetComputerName lpBuff, Len(lpBuff)
sComputer = Left$(lpBuff, (InStr(1, lpBuff, vbNullChar)) - 1)
lpBuff = ""
MsgBox "Login User: " & sUser & vbCrLf & _
"Computer Name: " & sComputer
End
Since my query (that create a table)is used by multiple users, is there a way i can name the table created by using the userId(sUser)so they won't interfere each other?
Thanks
On an openform event, i get the userId with the following code:
Dim sUser As String
Dim sComputer As String
Dim lpBuff As String * 1024
'Get the Login User Name
GetUserName lpBuff, Len(lpBuff)
sUser = Left$(lpBuff, (InStr(1, lpBuff, vbNullChar)) - 1)
lpBuff = ""
'Get the Computer Name
GetComputerName lpBuff, Len(lpBuff)
sComputer = Left$(lpBuff, (InStr(1, lpBuff, vbNullChar)) - 1)
lpBuff = ""
MsgBox "Login User: " & sUser & vbCrLf & _
"Computer Name: " & sComputer
End
Since my query (that create a table)is used by multiple users, is there a way i can name the table created by using the userId(sUser)so they won't interfere each other?
Thanks