Capture Pswrd & Userid To Auto Populate Form

  • Thread starter Nikki Norris via AccessMonster.com
  • Start date
N

Nikki Norris via AccessMonster.com

Hello,
I have a table of user id, password & name. I have a form that in order to
modify it you must have a password. This is captured in my password
routine.

1. I need to capture the userid and name at the password sign-in level.
2. Once I have the username, I need to auto populate the form with the user
name, date and timestamp.

Does anyone have a routine or code for this?

Thanks,
Nikki
 
J

Jeff Conrad

in message:
Hello,
I have a table of user id, password & name. I have a form that in order to
modify it you must have a password. This is captured in my password
routine.

1. I need to capture the userid and name at the password sign-in level.
2. Once I have the username, I need to auto populate the form with the user
name, date and timestamp.

Does anyone have a routine or code for this?

Hi Nikki,

Yes, I have done something like this before and can certainly share some code
with you, however, I must point out that this type of "home-grown" security
is by no means *secure* at all. Anyone with a little bit of Access knowledge
can bypass this stuff pretty easily.

How Access-savvy are your users and what type of data are you trying to protect?
Have you considered implementing built-in Access User Level Security (ULS)?
It is much more secure than creating something yourself and you have a lot
more control over individual database objects.
 
P

Paul Overway

This is a bad idea for several reasons:

1. If you're trying to capture the user's network login/password...you
can't/shouldn't. You CAN get their login name, but how secure would
windows/your network be if a program could capture passwords? Not very.
Moreover, your app would have to be running when they log in on the
PC/network.
2. If you save this information in any Access database...even if user level
security is implemented, it can be cracked....in seconds.
3. If you're using the same login/password for your app as the network, this
is a giant security hole....even if user level security has been
implemented. IMO, any network admin that would allow you to a) have user
passwords b) store them in an Access database that is not restricted solely
to domain admins...well, they just shouldn't have a job.

I suggest you implement user level security and specifically instruct users
NOT to use the same password as they use for their network login.
 
N

Nikki Norris via AccessMonster.com

Hi, the user audience does not have access knowledge. The security is just
to audit the last person that modified the records. My form will auto
populate the username field with the locked property set to "yes" so no one
can change it once in the form. A simple routine is all I need to satisfy
this requirement.

Thanks for your help,
Nikki
 
N

Nikki Norris via AccessMonster.com

You are correct. The passwords and userid's are all separate and different
from the Netword id's and passwords. There are about 6 users that I am
using this for. No one else has access to the drive that it's on and no
one else is using the database. The manager just wants to be able to track
modifications and see who made the last update.

I know there's a simple routine out there that would handle this.

Thanks for your help.
Nikki
 
J

Jeff Conrad

in message:
Hi, the user audience does not have access knowledge. The security is just
to audit the last person that modified the records. My form will auto
populate the username field with the locked property set to "yes" so no one
can change it once in the form. A simple routine is all I need to satisfy
this requirement.

Ok, sure I have some stuff that can help. It is at the office and I am
heading off to bed now so I will reply back tomorrow with full details.

In the meantime if you want to play around, the short story is to create
a public variable in a standard module that will hold the User Name.
You assign the User Name to the variable right when your authentication
code happens. Then you just reference it when you need to.
Thanks for your help,

No problem.
 
J

Jeff Conrad

in message:
Hi, the user audience does not have access knowledge. The security is just
to audit the last person that modified the records. My form will auto
populate the username field with the locked property set to "yes" so no one
can change it once in the form. A simple routine is all I need to satisfy
this requirement.

Nikki,

1. Just create a new public variable in a standard module:

Public gstrUserID As String

2. Create a new public function in that same module:

Public Function GetUserID()
GetUserID = gstrUserID
End Function

3. After your "authentication" code runs on your login form, pass the
user name to this public variable. Something like so:

gstrUserID = Me.txtUserName

4. Then on any text box you can set a default value of:

GetUserID()

When that other form opens the text box will default to display the name
of the currently logged on user. You can just set the Enabled property
to False so it cannot be messed with.

You'll need to be careful about this public variable being reset if an error
in your code occurs. To avoid this, distribute MDE files to your users
(you should be doing this anyway) so the variable will not be reset if an
error occurs.

I *must* remind you again that this is far from being "secure" at all. This
setup can easily be bypassed with little trouble. For the best security
possible in an Access/Jet database you really should consider implementing
User Level Security:

http://www.ltcomputerdesigns.com/JCReferences.html#Security
 
N

Nikki Norris via AccessMonster.com

This is Great and exactly what I needed. Thank you sooo much.

You are right, I'll use this as a temporary workaround until I learn more
about ULS and implement USL at a later date.

Thanks again!
Nikki
 
J

Jeff Conrad

in message:
This is Great and exactly what I needed. Thank you sooo much.

You're welcome Nikki, glad I could help.
You are right, I'll use this as a temporary workaround until I learn more
about ULS and implement USL at a later date.

Very good.
It is a difficult concept to grasp at first, but you can do so much more with
ULS and you'll actually sleep at night.
:)
Thanks again!

No problem, good luck with your project.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top