A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Saving User ID for each record



 
 
Thread Tools Display Modes
  #1  
Old February 17th, 2006, 09:04 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Saving User ID for each record

Hello,

On my form I have a field called Employee Name. I used some code that I
found on another thread to capture the User ID of the person who opens the
database. Everything works great except for one thing, when I click back to
previous records it shows who ever is logged in at the time on all the
records. How to I get the user name to appear when the database is open and
save that name to that record so when some else opens the database, their
will not show on that record.

I knew something wasn't going to work right, it was going too easy.

Thanks!!
  #2  
Old February 17th, 2006, 09:29 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Saving User ID for each record

You need to put the UserID in that field in the "before insert" event for
the form. Sounds like you simply have a text box and you are displaying the
current UserID.

Note that I said you need to put that value in the FIELD before insert. You
have to actually have a field in your tale where you save this.

If it were me, I would lock that field down so the user can't modify it in
any way.

--
Rick B



"Doug_C" wrote in message
...
Hello,

On my form I have a field called Employee Name. I used some code that I
found on another thread to capture the User ID of the person who opens the
database. Everything works great except for one thing, when I click back
to
previous records it shows who ever is logged in at the time on all the
records. How to I get the user name to appear when the database is open
and
save that name to that record so when some else opens the database, their
will not show on that record.

I knew something wasn't going to work right, it was going too easy.

Thanks!!



  #3  
Old February 21st, 2006, 02:01 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Saving User ID for each record

Hi Rick,

Thank you for responding. I am not sure I understand what you are saying?
You are correct, I have a text box that displays the current user ID and am
trying to get it to store to the table. However, I am a bit confused on your
answer. If I have a field called "Employee Name" on the form and also on the
table. Are you saying I need to put the code I am using to show the current
user in the "before insert" event of the form? I'm also not sure what you
mean by place value in the field before insert? I apologize, but my
comprehension of access is not as up to par as a lot of you guys who solve
these problems. Could you please clarify and break it down a bit for me?

Thanks!

"Rick B" wrote:

You need to put the UserID in that field in the "before insert" event for
the form. Sounds like you simply have a text box and you are displaying the
current UserID.

Note that I said you need to put that value in the FIELD before insert. You
have to actually have a field in your tale where you save this.

If it were me, I would lock that field down so the user can't modify it in
any way.

--
Rick B



"Doug_C" wrote in message
...
Hello,

On my form I have a field called Employee Name. I used some code that I
found on another thread to capture the User ID of the person who opens the
database. Everything works great except for one thing, when I click back
to
previous records it shows who ever is logged in at the time on all the
records. How to I get the user name to appear when the database is open
and
save that name to that record so when some else opens the database, their
will not show on that record.

I knew something wasn't going to work right, it was going too easy.

Thanks!!




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading and Saving record? Mike General Discussion 1 May 5th, 2005 12:28 PM
Loading and Saving record? Mike Using Forms 1 May 5th, 2005 12:28 PM
Procedure run (Access open / Close) Niklas Östergren General Discussion 9 December 29th, 2004 02:02 PM
Putting code in a subform? Maury Markowitz General Discussion 14 October 25th, 2004 11:32 AM
Form Doesn't Go To New Record Steve New Users 15 May 16th, 2004 04:33 PM


All times are GMT +1. The time now is 08:30 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.