I can offer alternatives that should be a lot simpler that don't rely on backwards compatibility:
- either use a login form (with all its inherent password management issues) or
- get the Windows user login id and upon user opening db, check if they are in the table of users
The latter allows you to keep out those who aren't registered in the table. When any registered user opens db, save their login date/time/user info as a record. Then usage data is a simple matter of querying tblUsers. If you also record the logout date/time, you can see other user info such as abnormal db closing (log ins without log outs) as well as duration per user.
IMO, a password/login form is really only needed for when more than one user accesses a pc under some other already established login. I suspect there's not much of that going on in the pc world.
Notes:
GUID field/data takes up a lot of memory/disk space in comparison to anything else
In that code, i is a variant, j is a long. It's a common mistake, unless in this case it was intentional. Not properly declaring variable types always leaves this open to interpretation.
EDIT - forgot to say that some like to use TempVars rather than code that gets the user's Windows login name. Also, I passed on troubleshooting your code because I'm unfamiliar with that method, and wouldn't use it.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.