Hello,
I try to resolve the problem myself, but I don't.
I found a code on the web to know which person use an access application, and I try to modify a part for my utilisation.
Code:
' Nouvel utilisateur
Set loUser = New clLDBUser
loUser.ComputerName = TrimNull(StrConv(lBuffer1, vbUnicode))
' Test l'utilisateur en fonction du ComputerName
loUser.UserName = DLookup("[Utilisateur]", "Users", "[Poste]=" & loUser.ComputerName)
loUser.NumConnection = lNbUser
When I run the application, the field "UserName" is complete by "Admin" for every users but I want to know the name of the person who use the PC.
So I make a table "Users" with 2 row : '[Poste]' and '[Utilisateur]'. With this table, I can found who match with the good Computer.
But I don't understand how I can use the variable loUser.ComputerName on my Dlookup function.
When I try to compare '[Poste]=' with a String, I found the name, but with the variable it's notificate me "error '91' " or " The value xxx create an error" where xxx = the loUser.ComputerName
If someone could help me ?
Thank you by advance.