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
|
|||
|
|||
need a form to auto date on table
I have a data base that keeps track of links and the date they were visited
last. I have a date field in my table that I would like to record the date that the link was clicked. I tried setting up an auto date in the table, however the form will not overwrite if the latest date is newer. How can I get my form that displays the the queried links to put date() into the appropriate field on the table? This would allow me to filter my queried results oldest to newest. Thanks |
#2
|
|||
|
|||
need a form to auto date on table
In the Before Update event of your form;
Me![YourDateField] = Now() -- _________ Sean Bailey "zippyties" wrote: I have a data base that keeps track of links and the date they were visited last. I have a date field in my table that I would like to record the date that the link was clicked. I tried setting up an auto date in the table, however the form will not overwrite if the latest date is newer. How can I get my form that displays the the queried links to put date() into the appropriate field on the table? This would allow me to filter my queried results oldest to newest. Thanks |
#3
|
|||
|
|||
need a form to auto date on table
Hi Zippyties
There is no such thing as an "auto date" field. You can set the DefaultValue of a date/time field to =Date() or =Now() and this will ensure that new records that are created in your table have the current date (and time if you use Now) written into that field. To update a date/time field in a record that already exists, you must use an event of a form. For example, it is common to use the form's BeforeUpdate event to update a field recording when the record was last changed. For your application, it sounds like you should use the Click event of the control containing the link: Private Sub MyLink_Click() LastVisited = Now() End Sub -- Good Luck :-) Graham Mandeno [Access MVP] Auckland, New Zealand "zippyties" wrote in message ... I have a data base that keeps track of links and the date they were visited last. I have a date field in my table that I would like to record the date that the link was clicked. I tried setting up an auto date in the table, however the form will not overwrite if the latest date is newer. How can I get my form that displays the the queried links to put date() into the appropriate field on the table? This would allow me to filter my queried results oldest to newest. Thanks |
Thread Tools | |
Display Modes | |
|
|