Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Password / Login 1

Status
Not open for further replies.

jbento

Technical User
Jul 20, 2001
573
US
I would like to create a way for a user to login and use a password for their particular record in the database. Could I make a user table with an ID field that is associated with their record, and create a login / password prompt for that? Does anyone know how I could go about doing this? Is their easy code for this? Please help. Thanks.
 
I've seen this done where all users details are stored on a table in the following format

UserID FirstName LastName LoginID PasswordID
------ --------- -------- ------- ----------

key inputmask

The user would enter their login details, then in the afterupdate event for the password textbox, VBA would go and check the password given against the username. If the username wasn't recognised, you would be kicked out, if the password wasn't recognised, you would be sent back to the password text box via a 'docmd.gotocontrol' function;

only problem is, I don't know the code to get the blasted thing going myself, but it has been done, therefore you can do it. DO NOT GIVE UP HOPE!! If I find out how to do this, I will put the code in a reply!!!

craig@chyld.co.uk

 
Thanks. I guess I am on the right track:). I will continue looking myself. Thanks so much.
 
jbento:

Have you looked at the security wizard and/or considered using a workgroup security file?

Access security isn't first rate but does do a reasonably good job of creating user accounts and groups.

Before you invest a lot of time in designing your own system take a look at what Access offers.
Larry De Laruelle
larry1de@yahoo.com

 
Larry,
This is probably not the best way, but I figured out something. I am going to place a field called userName and Password in my table. I am going to create a query from that table, that has a parameter to for each field, to prompt user to enter username and password. They will have to add the username and password to each new record they create. The fields will be required, so they can't bypass. Nobody else will have access to their records. I will disallow the "F11" shortcut feature to bring up the database window/design, so they will not see username and passwords from others. It might not be the best security or robust way for users, but I think it will work until I start getting a lot of complaints:). What do you think about this?

Jerome
 
jbento:

It seems like a lot of work on your part and, potentially, an inconvenience to your users. However, if your security needs are that restrictive it should be doable.

If I understand what you are trying to do, you could use an alternative approach of capturing the user's network logon with [CurrentUser] and add that to the new records automatically. Add whatever field you created for user name to the input form/s and set it's default value to [CurrentUser]. In the queries that extract the data for display, put [CurrentUser] in the criteria cell for the user name field.

This would eliminate the need for the user to repetitively enter the info and could still be used as a filter to limit the display to only those records created by that user.

You could then use the Access Security to limit who could access the front end of the application and still limit what they could see after they enter.

Will this accomplish what you are trying to do?
Larry De Laruelle
larry1de@yahoo.com

 
THIS IS GREAT!!! I'm on lunch right now, but I will implement this way, when I get back to work this afternoon. Thank you so much!!!!
 
jbento:

Happy to help. Hope this gives you a way to accomplish your goal with minimal effort on your part and minimal irritation to the users.
Larry De Laruelle
larry1de@yahoo.com

 
Been reading up on the systems used by access itself....

The login screen that I have seen myself (It's on a database that i use at work) is totally excellent.

It's clear, concise and doesn't bugger your system up like the access login can.

I'll try and pull the code on it from work tomorrow

give me your email address and i'll send you the code on a notepad file!

craig@chyld.co.uk

the faster rabit lost to the slower turtle.
 
Clyde,
This just gets better and better:). You can send to my email address at work and at home: my work email is:
bjerome@dvsis.com

My home email address is: jbento@home.com

Thanks very much my friend. I'll be looking for it tomorrow.

Jerome
 
Craig:

I wouldn't mind having a look at that myself. Please send to the e-mail below.

Thanks.
Larry De Laruelle
larry1de@yahoo.com

 
CC myself as well please! :)

Joe Miller
joe.miller@flotech.net
 
Right, I've got the code on the way from work. (A friend of mine is strip searching it right now to see where it hides!)

It's a funny bit of code...

Quite lengthy If I remember correctly, but then again, I'm not a codester..

We ran into trouble with the servers this afternoon due to this 'CodeRed' virus being released tonight apparently... The boys in IT decided that they would cut all internet activity until the virus has dissapeared.

Still searching for you though boys!!

I will email all of you when the code is available...

Craig@chyld.co.uk
 
I would also like to see this code.
Please send it to me as well.

nate@blackwellok.com

Thanks

Nate
 
Just to add my 2 pennorth and to give people a choice, I have a small mdb, which has a logon screen, encrypts the user password and only displays switchboard items dependant on the user's security level (this bit is hard coded as there wasn't a need to make it user configurable, but it wouldn't take a lot to make it so).
If anyone's interested, drop me a line at graham.ball@europe.com and I'll send you a copy.

regards,
Graham
 
Gball,
Quick question. I would like to use something like that on a network at my job. I would like to use users existing network username and password for this. Is this something I can do with your implementation? Please let me know. Thanks.

Jerome
 
Shouldn't be a problem, if you see Larrydelaruelle's second post on 30/07 regarding the [currentuser] setting.
You could check that in the logon screen and if a bonafide user, set the appropriate security level and go straight to the switchboard, otherwise display the logon screen (would work for remote/dialup users maybe, depending on how they access the system).

rgds,
Graham
 
Ok, I'm sold. Please send to me at: jbento@home.com. Thank you so much.

Jerome
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top