Using NT logon to authenticate Access User

I have a database in Access97 that automatically detects the NT userid.  I would like to use this information to set the current user.

In other words, I don't want my users to have to logon, instead I want to create users in access with their NT userid's, then detect the NT id at logon and compare it to the user name in the users list, if the name does not exist, I'd like to either log the person on as guest or kick them out of the database.  

If I can implement this, no passwords will be necessary because detecting the NT userid would authenticate.

If I cannot do that, can I at least allow users to logon as guest (or whatever), then detect their userid's and somehow programatically change the current user to the NT id?

Any help at all would be appreciated.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The very suggestion that I was giving someone else in the last few days who was worried about login and passwords.

In Novell we have the capability of writing a logon script which allows us to pass the userid on to a program in the command line, or to put the userid in an environmental table.

It would probably be best to use somekind of network or environmental variable to get into Access in the first place.

If this does not work out, then once in Access (using a login database), you can open the real database with the usernames that you have arrived from NT.

I believe that this is what you want to do.  Yes?  Do you know how to open a workspace from within Access?  If not, I'll try to supply you with some code samples.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JinxyAuthor Commented:

The logon database idea sounds like the way to proceed.  If you would supply the code for opening a workspace, I would appreciate it and thanks for all of your help.

JinxyAuthor Commented:

Thanks for your response, I found it extremely useful.  I hope all goes well for you on this site and that you continue to help the up and coming.

You are truly  a person who believes in the "spirit" of helping.

-Charlene (Jinxy)
Rather than giving you all the code, let me point some areas to look at within Access and you can decide which is the best method.

For opening workspaces look under help for CreateWorkSpace Method.

For opening databases look under help for OpenDatabase Method.

There could be an alternative method by just opening two sessions of Access.  The initial load database and the program database.

Let me find the code for the alternate method and post it for you.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.