How to find login name

Hi Guys,

I've written an access project database that automatically uses the generic dialog prompt for the users credentials. How can I stop this generic dialog box from appearing so I can use a customised form that asks for the users credentials. I want to store the username in a global variable so the database knows who is logged onto a particular session. There doesn't seem to be a way of knowing who is logged into the project file, unless I'm missing something. Environ$("Username") will give me the windows login, is there something similar that gives me the sqlserver login for the session.

Thanks in advance.
LVL 2
dataflowjoeAsked:
Who is Participating?
 
dataflowjoeConnect With a Mentor Author Commented:
I'll ended up creating a generic login which only had permissions to a logins table this allowed the user into the ADP framework where I presented a dialog box where they confirmed their credentials against this logins table if the login is good a reconnection to the sql server is made with a hardcoded connection string that give the user full access to the database.
Not very elegant and probably breaking every rule in the book but it works really well.


0
 
EvilPostItCommented:
SELECT SYSTEM_USER
0
 
Anthony PerkinsCommented:
Correct my if I am wrong but I believe the author is asking how to bypass the dialog box that asks for a password when SQL Server tables are linked into an MS Access database.
0
 
Anthony PerkinsCommented:
>>Not enough participation<<
Unfortunately not enough feedback for what should have been a trivial solution in MS Access.
0
 
dataflowjoeAuthor Commented:
Not enough participation
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.