Hi!
Using Access, i get the UserId with the following code when i open a form:
Private Sub Aperçu_Enter()
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
End Sub
When executing a query, is there a way i can create a new table using fixed caracters + the UserId(sUser)?
Here is what i would like to have as the table name:
Tblx-Userxx
Thanks
Using Access, i get the UserId with the following code when i open a form:
Private Sub Aperçu_Enter()
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
End Sub
When executing a query, is there a way i can create a new table using fixed caracters + the UserId(sUser)?
Here is what i would like to have as the table name:
Tblx-Userxx
Thanks