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
|
|||
|
|||
How can I make the date field change automatically when I make a .
How can I make the date field change that I set up automatically change when
I make changing in my other fields... etc. If I change a persons name in the name field, I want my date field to reflect and change when I made the change. |
#2
|
|||
|
|||
Put the following code in the BeforeUpdate event of your data entry form.
Me.txtYourDateField = Date() -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "Ngina 28" Ngina wrote in message ... How can I make the date field change that I set up automatically change when I make changing in my other fields... etc. If I change a persons name in the name field, I want my date field to reflect and change when I made the change. |
#3
|
|||
|
|||
Lynn -
I have a field called lastUpdated and it is a manual field that we change whenever we get a new email/phone/address/add a course, etc in a training table. What coding do I use for that field? I tried it on the berfore and also on the after update field and still didn't have any luck. I do this on the form...for the field lastUpdated...and put that event in there, right? Thanks!!! Tony "Lynn Trapp" wrote: Put the following code in the BeforeUpdate event of your data entry form. Me.txtYourDateField = Date() -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "Ngina 28" Ngina wrote in message ... How can I make the date field change that I set up automatically change when I make changing in my other fields... etc. If I change a persons name in the name field, I want my date field to reflect and change when I made the change. |
#4
|
|||
|
|||
Putting the code in the Before Update will cause it to update when you make
a change to the record, but not if you simply view the record. Private Sub Form_BeforeUpdate(Cancel As Integer) Me.LastUpdate = Date() End Sub Rick B "Tony" wrote in message ... Lynn - I have a field called lastUpdated and it is a manual field that we change whenever we get a new email/phone/address/add a course, etc in a training table. What coding do I use for that field? I tried it on the berfore and also on the after update field and still didn't have any luck. I do this on the form...for the field lastUpdated...and put that event in there, right? Thanks!!! Tony "Lynn Trapp" wrote: Put the following code in the BeforeUpdate event of your data entry form. Me.txtYourDateField = Date() -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "Ngina 28" Ngina wrote in message ... How can I make the date field change that I set up automatically change when I make changing in my other fields... etc. If I change a persons name in the name field, I want my date field to reflect and change when I made the change. |
#5
|
|||
|
|||
I haven't done any coding in Access before. Where do I insert that code?
And what does "Me" standfor in Me.LastUpdate? We have a responder table that holds most of the info and we wanted this lastUpdated to change when we touch any of the others...will that be the case? Thanks Rick! Tony "Rick B" wrote: Putting the code in the Before Update will cause it to update when you make a change to the record, but not if you simply view the record. Private Sub Form_BeforeUpdate(Cancel As Integer) Me.LastUpdate = Date() End Sub Rick B "Tony" wrote in message ... Lynn - I have a field called lastUpdated and it is a manual field that we change whenever we get a new email/phone/address/add a course, etc in a training table. What coding do I use for that field? I tried it on the berfore and also on the after update field and still didn't have any luck. I do this on the form...for the field lastUpdated...and put that event in there, right? Thanks!!! Tony "Lynn Trapp" wrote: Put the following code in the BeforeUpdate event of your data entry form. Me.txtYourDateField = Date() -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "Ngina 28" Ngina wrote in message ... How can I make the date field change that I set up automatically change when I make changing in my other fields... etc. If I change a persons name in the name field, I want my date field to reflect and change when I made the change. |
#6
|
|||
|
|||
You need to open the form in design-view. Go into the form's properties box
and find the "update" event. double-click in that field or select "event procedure" from the drop down, then click the elipse to the right (...). Update the code window as outlined in my earlier post. Hope that helps. Rick B "Tony" wrote in message ... I haven't done any coding in Access before. Where do I insert that code? And what does "Me" standfor in Me.LastUpdate? We have a responder table that holds most of the info and we wanted this lastUpdated to change when we touch any of the others...will that be the case? Thanks Rick! Tony "Rick B" wrote: Putting the code in the Before Update will cause it to update when you make a change to the record, but not if you simply view the record. Private Sub Form_BeforeUpdate(Cancel As Integer) Me.LastUpdate = Date() End Sub Rick B "Tony" wrote in message ... Lynn - I have a field called lastUpdated and it is a manual field that we change whenever we get a new email/phone/address/add a course, etc in a training table. What coding do I use for that field? I tried it on the berfore and also on the after update field and still didn't have any luck. I do this on the form...for the field lastUpdated...and put that event in there, right? Thanks!!! Tony "Lynn Trapp" wrote: Put the following code in the BeforeUpdate event of your data entry form. Me.txtYourDateField = Date() -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "Ngina 28" Ngina wrote in message ... How can I make the date field change that I set up automatically change when I make changing in my other fields... etc. If I change a persons name in the name field, I want my date field to reflect and change when I made the change. |
#7
|
|||
|
|||
Note: the "me" indicates the current object (the form).
"Tony" wrote in message ... I haven't done any coding in Access before. Where do I insert that code? And what does "Me" standfor in Me.LastUpdate? We have a responder table that holds most of the info and we wanted this lastUpdated to change when we touch any of the others...will that be the case? Thanks Rick! Tony "Rick B" wrote: Putting the code in the Before Update will cause it to update when you make a change to the record, but not if you simply view the record. Private Sub Form_BeforeUpdate(Cancel As Integer) Me.LastUpdate = Date() End Sub Rick B "Tony" wrote in message ... Lynn - I have a field called lastUpdated and it is a manual field that we change whenever we get a new email/phone/address/add a course, etc in a training table. What coding do I use for that field? I tried it on the berfore and also on the after update field and still didn't have any luck. I do this on the form...for the field lastUpdated...and put that event in there, right? Thanks!!! Tony "Lynn Trapp" wrote: Put the following code in the BeforeUpdate event of your data entry form. Me.txtYourDateField = Date() -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "Ngina 28" Ngina wrote in message ... How can I make the date field change that I set up automatically change when I make changing in my other fields... etc. If I change a persons name in the name field, I want my date field to reflect and change when I made the change. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Syntax needed to get needed reports | Frank Lueder | New Users | 15 | January 6th, 2005 08:39 AM |
Can I automatically imbed a "change date"? | BigBlueMan | Contacts | 0 | November 11th, 2004 04:15 PM |
Filtering on custom date field | MED | Contacts | 3 | September 17th, 2004 03:05 PM |