Your original request above displays VBA coding, not a macro. I use Environ in SQL's and VBA all the time. Here is a short sample...
INSERT INTO tblUserLog ( NetworkID, [DateTime] )
SELECT DISTINCT UCase(Environ('UserName')) AS NetworkID, Now() AS [DateTime]
FROM tblUserLog;
or...