Recording the date and time a form was last updated

alfiwalf

Registered User.
Local time
Today, 15:26
Joined
Jul 23, 2014
Messages
11
Hi,

I have read many of the posts to do with displaying the 'Last Modified' dates and time on a form and I am still confused as to how to go about doing what I want to do.

I would like to display on a form in one single field the date & time that any of the fields on that form were changed and. I would like to display it in such a way that it cannot be altered by anyone. If it is possible to capture and display on the form in a separate field which user account accessed and changed the record then all the better. Obviously if nothing is updated then the date and time stays the same.

I appreciate that I will have to create two new fields in the table that relates to the form and this I have done - one of format Date/Time and one of format Text.

I have looked at the code different folks have posted and created 'Event Procedures' as the threads have directed but none seem to work without giving any errors.

Any help or pointers will greatly reduce the frustrations :)
 
You can save the last update date and time by binding a text box on the form to a field in the table and then put one line of code in the forms Before Update event. Lets say you name the text box LastUpdated. The line of code would be:
Me.LastUpdated = Now()
 
I have looked at the code different folks have posted and created 'Event Procedures' as the threads have directed but none seem to work without giving any errors.
If you are asking a question about code that produces errors, you need to post the code, and describe the errors. Those problems are very specific and you need to describe them in detail.

Hope this helps,
 
Hi guys,

Many thanks for the prompt replies so to deal with them one by one:

Bob, I have tried what you said and yes it worked; many thanks. I need to progress this further as in my first posting of today.

MarkK, I do not have the code(s) anymore they were codes I found whilst browsing the different Internet sites for answers to my problem. I found that by altering them to what I thought was correct I had errors in relation to my forms and tables. What I now want to do is start from scratch and produce the results as in my first post today.

I am not asking anybody to write it for me as I will never learn; what I would like is some pointers to get me to my goal. So to start with I would like to append the 'Last Modified' date & time to a form I have already created and get it to update when something is changed and to remain the same when someone looks at the form but does not alter it.

If it's as simple as Bob's solution then problem solved; if not then I am asking for help please.

The next step after the 'Last Modified' stage is that I would like to record on the form what user made the changes.

Again I thank you both for your assistance.
 
The instructions I gave in post #2 should deal with updating the record but you will want to set the Enabled property of the text box to No and the Locked property to Yes so that it can be see but not altered by users.
Let us know if you have any problems.
 
Guys,

I'm back from leave and still struggling so to continue. I have a form (Form1) that has a text box (TextBox1), I want to be able to enter text in TextBox1, select a button on Form1 that will open another form (Form2) that has a text box (TextBox2) and automatically carry the text in TextBox1 over into TextBox2.

I know I said I needed some pointers but can someone help me with the following please:

1) What code do I need to add to Form1 and where do I place it?
2) What code do I need to add to Form2 and where do I place it?

The other points I raised I have sorted but this carrying text over from one one form to another I am really struggling with :banghead:

Regards.
 

Users who are viewing this thread

Back
Top Bottom