Is there any way to get Access 97 or 2000 to Authenticate the user by taking into account their Windows NT login details rather than using an Access Security and having to login?
This code returns the logon id. Slogon can be declared whereever it is helpful to you. In my case, I refer to sLogon throughout my database, so I've defined it in a global module. Maq
<insert witty signature here>
Thanks again, Do you have to create your own logon box to the system or can you use the security settings within access? As you may have guessed, this is an area that quite interests me and I want to study it further as well as incorporate it into all future systems.
I have never used Access's security, so I can't give you any advice there. This code simply returns an id. It doesn't use a dialog box or give you any security. You can do a keyword search in these forums and faqs for some good advice on Access security.
Maq
<insert witty signature here>
{trying not to look dumb}
Okay, Maquis, some questions:
1) What is the type of variable sLogon?
2) Where would this code go? In a startup or autoexec or ???
3) Would it be appropriate to then route to certain main screens based on the userid (i.e. JoeDoe gets Main, but SaraDoe gets Main1, etc.)?
Sorry I'm so dense about this, but I have this very need...
You don't look dumb. It takes a while to understand this stuff if you've never used VB code before, trust me.
1. I defined sLogon as a string
2. Put the code in a module. In my case, I call the code from an autoexec macro. You can call it that way or from a startup form or from wherever you need the user's logon. Whatever works for you.
3. No problem. That's a perfect way to use the code. If you want more detail (and more code) check out these faq's. faq181-1021 faq181-1172
The faqs deal more with issues concerning locking users out of the design of your database and keeping them glued to the forms, but the 2nd one does contain the startup code listed above plus some code which opens a "start up" form for any non-admin users. You could tweak the code to open up different forms for different people if you wish. Maq
<insert witty signature here>
Why don't you want to require users to log in? I've never had a single objection to this. Properly implemented, Access security can do all of what you're looking to do. It does take some work to understand it, but once you do, you'll never have to worry about it.
If you're interested, the MS FAQ about it is up on my website.
Jeremy =============
Jeremy Wallace
Designing, Developing, and Deploying Access Databases Since 1995
Awesome! I'll have to play with this some, but this should help immensely!
Jeremy: In our case, we have so many shared databases, that the MDW files get either corrupted or confused, and we end up with people not being able to get into them; thus my desire to be able to identify the users.
I'll probably end up with a central login database, which will then display a listing of the DB's a user can get to, which they they click and run off to...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.