I want to put a Last Updated Date Stamp on my table. Any ideas on the best way to do this without VB? I was thinking of using a macro but I'm not sure what to trigger it on.
What I did was add a field to my table called dateedited - On my data entry form I added code to the edit button that sets this date to the current date
Me.DateEdited = Now() (I think you can use "= date() also)
My form had the allowedits set to false until the edit button is clicked so if someone wants to add a record they must click the edit button.
I also have a field called lastedited which uses a module to get the users name from novell - Let me know if you want that information also
On the form used to update the table, include the DateStamp column (say MyDateCol), set its visible property to false if you do not want user to see it
In the before update event of the form put code so
MyDateCol = Date() ' for date only
MyDateCol = Now() ' for date and time
Regards
Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now -
I wanted to do something similar in my database. I wanted it to update 'last active date' in several tables, but not if I was just looking at the records. I have several update queries that run in the background on the 'after update' but only when I key in a specific control. I can key new products and new tickets, but it only runs my update queries after I key in my grand total in the billing. At that time, it updates the drivers that worked on that job (so I can see their last date worked), the last date that product was hauled (so I can eventually purge products no longer used), the supplier (so I can eventually purge suppliers that we no longer use) and the last date the job was worked on (so I can answer my boss when he asks when we last worked on a job).
This is very convenient and it doesn't appear to slow my computer down in a very obvious manner. This might not work for databases that have many users, but we only have two that use it at the same time.
I would just add the "last active" field for each table and in the after update event of the grand total field add the code to update the "last active" field to the current date
me.lastactive = date()
THat is if I am understanding what you are saying?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.