storing username after login

G

Guest

Hi there,

I have a login screen at the opening of my database. What I would like to
do is that after the user is logged in, that the user name is stored. I
would then like to have the user name stored when a record is added and
another field on my forms to store the user who last modified a record. The
user added would stay the same but user last update would change according to
a change that happens. What is the best way to do this, and also have it
work with multi users. I do not wish to use the User Level in Acccess but
wish to use my own login screen that I built.

Any help would be more then welcomed.

Sincerely,

Jean-Francois
 
K

Keith Wilby

Jean-Francois Gauthier said:
Hi there,

I have a login screen at the opening of my database. What I would like to
do is that after the user is logged in, that the user name is stored. I
would then like to have the user name stored when a record is added and
another field on my forms to store the user who last modified a record.
The
user added would stay the same but user last update would change according
to
a change that happens. What is the best way to do this, and also have it
work with multi users.

To grab the user's network ID and computer name:

http://www.mvps.org/access/api/api0008.htm
http://www.mvps.org/access/api/api0009.htm
I do not wish to use the User Level in Acccess but
wish to use my own login screen that I built.

That's your prerogative but I wouldn't think that approach would get much
support here. ULS has flaws but it's head and shoulders above a
roll-your-own solution.

Regards,
Keith.
www.keithwilby.com
 
G

Guest

Is there a way however to store the user name from my login form after it is
successfully logged in. Such as frm_main (used to log in) and field
[user_id]. This woudl be stored somewhere and kept for use to update other
records.

Thanks,

JF
 
K

Keith Wilby

Jean-Francois Gauthier said:
Is there a way however to store the user name from my login form after it
is
successfully logged in. Such as frm_main (used to log in) and field
[user_id]. This woudl be stored somewhere and kept for use to update
other
records.

Yes, bind your form to a table.

Keith.
 
R

Rick Brandt

Keith said:
"Jean-Francois Gauthier"
Is there a way however to store the user name from my login form
after it is
successfully logged in. Such as frm_main (used to log in) and field
[user_id]. This woudl be stored somewhere and kept for use to
update other
records.

Yes, bind your form to a table.

Keith.

Or...when the user fills out the control on the form and presses [OK] or
whatever button it is you have to close the form, don't actually close it. Just
set its Visible property to False. Now you can refer to the data on the form
any time you want.
 
G

Guest

Hi Rick,

Thanks for your reply. I used a similar method as what you have. I have my
login form, once the user is logged in the form closed and another hidden
form opens containing the user id.

Thank you for your help.

Sincerely,

Jean-Francois

Rick Brandt said:
Keith said:
"Jean-Francois Gauthier"
Is there a way however to store the user name from my login form
after it is
successfully logged in. Such as frm_main (used to log in) and field
[user_id]. This woudl be stored somewhere and kept for use to
update other
records.

Yes, bind your form to a table.

Keith.

Or...when the user fills out the control on the form and presses [OK] or
whatever button it is you have to close the form, don't actually close it. Just
set its Visible property to False. Now you can refer to the data on the form
any time you want.
 

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

Similar Threads


Top