By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,560 Members | 1,093 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,560 IT Pros & Developers. It's quick & easy.

Setting Up a simple ID and password system in access.

P: 12
Anyone know how to set up a simple ID and password system in access. So that when someone login, they either have access to the database window or not. like administrators, and managers login do, and others dont.
Nov 19 '06 #1
Share this Question
Share on Google+
9 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
Anyone know how to set up a simple ID and password system in access. So that when someone login, they either have access to the database window or not. like administrators, and managers login do, and others dont.
Access Security

This site goes into great detail about all aspects of Microsoft Access security features and should answer any questions on the subject.

http://www.jmwild.com/Accesssecurity.htm
Nov 19 '06 #2

P: 12
thanks for the sugestion
Nov 19 '06 #3

NeoPa
Expert Mod 15k+
P: 31,602
There are a number of ways of using IDs.
The Access Security System, stored in the .MDW file, can be used to force users to sign in as a user there.
If it's on a domain you can get the network ID (or you can get the user ID even on a stand-alone PC).
Lastly, you can set up your own security system using input from the operator.

With any of these, once you can determine who it is, you can code to allow or disallow access to various items.

Personally I prefer the network ID approach. I just get the UserName from the environment variables using Environ().
Any time I want to restrict something, I add a test in my code to search in my 'Allowed' list for the name I get returned.
If it matches then I continue.

If you disable access to the main database window by default, you could add a command button (or one of numerous triggers for your code) to show the main database window, protected by code that checks if the name is ok.

Environ Function


Returns the String associated with an operating system environment variable. Not available on the Macintosh

Syntax

Environ({envstring | number})

The Environ function syntax has these named arguments:

Part Description
envstring Optional. String expression containing the name of an environment variable.
number Optional. Numeric expression corresponding to the numeric order of the environment string in the environment-string table. The number argument can be any numeric expression, but is rounded to a whole number before it is evaluated.
Nov 19 '06 #4

P: 12
ok ive done the login setup already, however i need to show wat time did the person login and stuff, sort of like writing a log file.
Nov 22 '06 #5

NeoPa
Expert Mod 15k+
P: 31,602
What's wrong with the idea of creating a table in your database for logging to?
Writing a new record to the table as a log for every loggable item.
Nov 22 '06 #6

P: 12
What's wrong with the idea of creating a table in your database for logging to?
Writing a new record to the table as a log for every loggable item.
how do i do that, cause i create the login, using the external .mdw file.
Nov 22 '06 #7

P: 12
and lets say i create a new table for the logging stuff. How do i make it, so that everytime the person logs in, it logs what time he loged in
Nov 22 '06 #8

NeoPa
Expert Mod 15k+
P: 31,602
If what's already in this thread isn't enough to get you going then perhaps this concept is a step too far for you at this stage.
There's a link above to help understand the basics of MDW security.
Nov 22 '06 #9

P: 12
i think you misunderstood me. I already have the MDW security working. I just need to add a log file that will display when the person logged in. How do i do that?
Nov 22 '06 #10

Post your reply

Sign in to post your reply or Sign up for a free account.