Date and Time Stamp On Main Form

aiikahn

Registered User.
Local time
Yesterday, 18:44
Joined
Nov 13, 2006
Messages
18
Hello Everyone,

Just wondering if anyone might be able to help me with my dilemma? I'm trying to put a timestamp on my main form to record the date and time a user created a record. I only have one table consisting all of the data to include the date and user.

The mainform has two tab controls each contains a subform (one subform to enter the data and the other to list all the data entered in a continuous subform). Outside of the tab controls I'd like to place a datestamp-like textbox or label control to show when the form was "Last Modified [Date] by [User]".

I've tried using an unbound textbox/label with the value Date() for the BeforeUpdate event but it's just not working...Any assistance would be greatly appreciated. Thank you!

chris
 
Use 2 bound textboxes - 1 for the date last modified and the other for the user.
Include both the date last modified and the user in the query for the form.
Make the control source for the date text box the last modified date and for the user text box the control source will be the user field from the query.

If you put the 2 textboxes on the subform, they can be locked so the user can't change them.

If you want the textboxes on the main form, you can set the control source to something like:
=[SubformControlName].Form.[TextboxName]

To avoid any errors when the form has no data, you can use:
http://allenbrowne.com/RecordCountError.html
 
Sorry for the late response. I will try that. Thank you so very much!
 

Users who are viewing this thread

Back
Top Bottom