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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |