I’m engaging in a log in module for my Access program. But I don’t know much about it.
The uses log in their computers with windows logins, and in the database I have a table describing every login and their roles(worker, manager etc.).
What I want to do is when my program starts, it can auto detect the windows login, and according to the table, decides to hide some forms or reports.
Any suggestions? Thanks ..
Try this. Enter this outside of a procedure:
And enter this procedure:
Then GetUser() should give you the windows login name. I use this in several Access 2003 Frontends running on XP machines and haven’t had any problems with it.
(Side note: I actually got this code from Stack Overflow a long time ago, but I have no idea who gave it to me, so I can’t give proper credit)