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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |