Q: automatically recording date record was edited/added

A

A C

Hi

Is there a way to have Access automatically update a field in each record
indicating when that record was last edited/added? Forms are not to be
assumed, and probably wont be used ie the user may (will almost certainly)
edit directly into the table.

Each table would have this field.

This is along the lines of database triggers, but I am not sure if Access
does these.

If there are more appropriate groups or websites for this type of question
then please let me know, I did not see a group that seemed to cover this
sort of question.

Replies to newsgroup, email has been spammed out of existance.

All help greatly appreciated.

Thanks in advance
A
 
L

Lynn Trapp

PMFJI, but I want to add a comment to what my friend Doug said. Actually,
it's a question. Why would you want to allow your users to directly edit
the table? You can always create a form in datasheet view that looks just
like a table, if the users have some "psychological need" to be looking at a
"table". Then you can implement an Event Procedure to insert the date and
time a field was added or edited.
 
A

A C

Its not "psychological", its "temporal and monetary"
Ther reasons for not using forms are:
1. the sheer number of tables (3 digit) would make it a long and slow
process to make forms for each table, and related to this
2. this is a quick and dirty app that is about to be replaced so the minimum
time spent on it the better
3. we do not yet fully know what is required, we are doing bits and then
seeing how the people using them get on, so I dont want to spend time on
stuff that might get thrown away.

Slightly related is:
Certain fields (including ones that have yet to be added and I probably wont
be around when they are) need to be hidden and/or renamed for certain users,
and I plan to use a "system table" to specify what fields to show (and what
descriptor to display) and then dynamically genrate a query to show the
table contents based on the contents of this system table when the user
tries to open their table of interest (make sense?). If I make forms now
they would
1. not be dynamic for the future changes (unless there is some cool and
simple add-on or similar out there that can do a good job of on-the-fly form
making???)
2. would leave gaps in the pre-made if I simply "hide" certain fields when
it is open.
3. may stuff out if fields are deleted.


I am always open to suggestions. If someone has good ideas please dont hold
back.

Thanks for the info to date
A
 
L

Lynn Trapp

Well, put very simply, there is no way to automate an update to a table
apart from a form event procedure. Access does not support table level
triggers and, thus, you must use a form event procedure to imitate that
functionality. You can use a Default Value set to Date() or Now(), depending
on whether you want the Date or the Date and the Time, for any newly Added
records, but nothing will help you update it after it's been created short
of a form event procedure.
 

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