user accounts/tracking

L

Lisa Peters

Hi -
I am implementing an access database and want to track
changes made by different users, is this possible? ie;
user takes and order, other user changes the same order,
who touched it last etc..
thanks in advance.
Lisa
 
R

Rick B

Do a search. This has been asked and answered at least a dozen times in the
last few days. Check forms coding and multiuser groups.

Rick


Hi -
I am implementing an access database and want to track
changes made by different users, is this possible? ie;
user takes and order, other user changes the same order,
who touched it last etc..
thanks in advance.
Lisa
 
J

jody.burgess

-----Original Message-----
Hi -
I am implementing an access database and want to track
changes made by different users, is this possible? ie;
user takes and order, other user changes the same order,
who touched it last etc..
thanks in advance.
Lisa
.
yes there is a way, what you need to do is have a field in
the table the you want to place the current user's name
into. Then when you programmatically add the new record to
the table you would

With tablename
.Add
.mytablefieldname.value = CurrentUser().value
.adddate - Now()
end with

Something like that.
 
T

test

yes there is a way, what you need to do is have a field in
the table the you want to place the current user's name
into. Then when you programmatically add the new record to
the table you would

With tablename
.Add
.mytablefieldname.value = CurrentUser().value
.adddate - Now()
end with

Something like that.

Sorry, that code will not work at all! :)

Lisa, here is what you need to do.

1. Add two new fields CreatedBy (text) and UpdatedBy (text) to each of the
tables on which your forms are based.

2. In the Form_BeforeUpdate event of each of those forms, add something like
this:

if me.newrecord then
me![CreatedBy] = Currentuser()
else
me![UpdatedBy] = Currentuser()
endif

3. Use Tools:Security to add some new users (Tom, Dick, Mary etc.)

4. Add a password to the Admin user.

Now, when anyone opens the database, they must enter a valid username (say,
Tom). Then, when they add or edit records using your forms, the form will
put their name into the relevant field of the relevant table.

HTH,
TC
 
M

mafra

Hi,
yes it is possible, but may take some work:

-case .mdb have [User] and [Timestamp] field on each table
you want to log. Make sure to always fill the fields with
appropriate data. Use now() and currentuser() for timestamp
and user - fields. Make for all forms automatics to fill
these fields (vba/makros). Make sure users have only rights
to use the forms (forbid using tables/queries directly).
Case you want to preserv all old version of changed entries
you may need a "historytable" for each table you are
logging and have your automatisms copying the entry from
the logged table to the history before applying the change.

-case MSDE or SQLServer as backend make the above by using
trigger.
 
L

Lisa Peters

thanks for the help!
-----Original Message-----

"(e-mail address removed)"
message news:[email protected]...
yes there is a way, what you need to do is have a field in
the table the you want to place the current user's name
into. Then when you programmatically add the new record to
the table you would

With tablename
.Add
.mytablefieldname.value = CurrentUser().value
.adddate - Now()
end with

Something like that.

Sorry, that code will not work at all! :)

Lisa, here is what you need to do.

1. Add two new fields CreatedBy (text) and UpdatedBy (text) to each of the
tables on which your forms are based.

2. In the Form_BeforeUpdate event of each of those forms, add something like
this:

if me.newrecord then
me![CreatedBy] = Currentuser()
else
me![UpdatedBy] = Currentuser()
endif

3. Use Tools:Security to add some new users (Tom, Dick, Mary etc.)

4. Add a password to the Admin user.

Now, when anyone opens the database, they must enter a valid username (say,
Tom). Then, when they add or edit records using your forms, the form will
put their name into the relevant field of the relevant table.

HTH,
TC


.
 

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