A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Revision Date Field



 
 
Thread Tools Display Modes
  #1  
Old June 24th, 2004, 10:05 AM
external usenet poster
 
Posts: n/a
Default Revision Date Field

I have setup a table with entries and I am continuously
adding and revising records in the table with a form.

I want two different dates in the form.

The first date will be the day and time that the record
was first added to the table and shall not change. I am
currently using the Now() function and it seems to be
working fine.

The second date will be the date and time that the record
was last revised. This date should change each time I
update or save the existing record. I am having trouble
finding a time function that does this. Any suggestions?

Thanks,

Ron
  #2  
Old June 24th, 2004, 10:38 AM
Wayne Morgan
external usenet poster
 
Posts: n/a
Default Revision Date Field

Now() will work for the second option as well, but needs to be placed in a
different location. I suspect that for the new record, that you simply
placed Now() in as the default value of the field. For a revised record
though, you will need to do this in code. Place a textbox on the form and
bind it to the second date field (if you don't already have one), you can
set its Visible property to No if you like. In the form's BeforeUpdate
event, set the value of this textbox to Now.

Example:
Me.txtMyTextbox = Now

If the textbox is visible to the user, you may want to set its Locked
property to Yes so that the user can't change the value themselves.

--
Wayne Morgan
Microsoft Access MVP


" wrote in
message ...
I have setup a table with entries and I am continuously
adding and revising records in the table with a form.

I want two different dates in the form.

The first date will be the day and time that the record
was first added to the table and shall not change. I am
currently using the Now() function and it seems to be
working fine.

The second date will be the date and time that the record
was last revised. This date should change each time I
update or save the existing record. I am having trouble
finding a time function that does this. Any suggestions?

Thanks,

Ron



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
convert text field to a date field? [email protected] General Discussion 2 June 10th, 2004 10:20 AM
convert test field to date field and combine Ron General Discussion 0 June 10th, 2004 02:26 AM
Query a field with date/time date David Lansberry Running & Setting Up Queries 4 June 9th, 2004 03:18 PM
Pivot Table - Format of Date Field Michelle Worksheet Functions 1 February 3rd, 2004 07:56 PM
Convert date field to text Alan Worksheet Functions 4 December 19th, 2003 03:45 PM


All times are GMT +1. The time now is 12:09 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.