Save a Current User without a security level option!

G

Guest

I saw in an Acces Database without a security level a Form to enter a user
and a password and then open te Databases.
I made that
I create a table wiht a list of user and paswords and then create a form
using the user and passwords.

Howerver, I just want to create a text box wiht the current user in each new
record?
I'm not sure if I could do it!! But an apreciate any help.
 
B

Brendan Reynolds

Danny said:
I saw in an Acces Database without a security level a Form to enter a user
and a password and then open te Databases.
I made that
I create a table wiht a list of user and paswords and then create a form
using the user and passwords.

Howerver, I just want to create a text box wiht the current user in each
new
record?
I'm not sure if I could do it!! But an apreciate any help.


After validating the user, assign the user name to a global variable (a
variable declared using the 'Public' keyword in a standard module, not a
form or other class module). You can then read the value of that variable
from any procedure in your code, e.g. the BeforeUpdate event procedure of
your form.

Note though, that if are storing user names and passwords unencrypted in a
table, there is nothing to stop anyone from opening the table, or importing
it into another program, and reading your user names and passwords. The best
advice about "home grown" security schemes is usually "don't do it".
 

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