Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / March 2007

Tip: Looking for answers? Try searching our database.

How do you automaticaly add the user name to the record

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sean - 22 Mar 2007 18:03 GMT
I am trying to develope a database in access 2003 which can log who entered
specific notes into the notes table, can any one help on how this can be doen
autopmaticaly
storrboy - 22 Mar 2007 18:32 GMT
> I am trying to develope a database in access 2003 which can log who entered
> specific notes into the notes table, can any one help on how this can be doen
> autopmaticaly

Nothing is automatic. You have to create a log-in form (or use Access
security), capture the login and write it to whevere it needs to be
written using queries and likely code. There have been numerous posts
about it in this group and comp.databases.ms-access that you can
search for and read. I beleive there are also topics on it at
www.mvps.org/access as well as number of contributors that have links
there. Start by doing as much reading as you can then look for answers
to specific problems, issues and questions.
BruceM - 22 Mar 2007 18:58 GMT
One way would be to have the After Update event for the text box bound to
the Notes field contain something like:
Me.NoteWriter = CurrentUser()
where NoteWriter is the text field in which the user who who wrote the note
is recorded.  You may need to do something to lock the control after the
note has been added, or the CurrentUser will become the last person who
edited the information.  Logging in as a particular user, as mentioned in
another reply, is what will make this work.  Implementing User Level
Security is one way.  Search for that term and you should get all sorts of
links and other information.  This page contains links to several helpful
sources:
http://www.jmwild.com/Accesssecurity.htm

>I am trying to develope a database in access 2003 which can log who entered
> specific notes into the notes table, can any one help on how this can be
> doen
> autopmaticaly
John W. Vinson - 22 Mar 2007 23:41 GMT
>One way would be to have the After Update event for the text box bound to
>the Notes field contain something like:
>Me.NoteWriter = CurrentUser()

This may not give the desired results unless the database is secured using
workgroup security and all users log on with their own name; by default this
will pick up the username Admin.

            John W. Vinson [MVP]
BruceM - 23 Mar 2007 11:54 GMT
I should have provided a link to information about user-level security.
Actually, if you had asked me I would have said that I did so.  Maybe that
was another posting.

>>One way would be to have the After Update event for the text box bound to
>>the Notes field contain something like:
[quoted text clipped - 6 lines]
>
>             John W. Vinson [MVP]
DBS - 22 Mar 2007 20:06 GMT
Assumming that you're in an enviroment where users log into a network, you
can grab their login ID using the following example:

API: Get Login name
http://www.mvps.org/access/api/api0008.htm

Depending on how exactly you want it to work, you can call that function in
the BeforeInsert or BeforeUpdate event on the form level.

For example, if you have a field named "AddedBy" on your form, you can do
something like:

Private Sub Form_BeforeInsert(Cancel As Integer)
    Me.AddedBy = fOSUserName
End Sub

Hope that helps!

David

> I am trying to develope a database in access 2003 which can log who entered
> specific notes into the notes table, can any one help on how this can be doen
> autopmaticaly
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.