dbTalk Databases Forums  

Date field that automatically updates record with date last modified (i.e. current date you're editing the field)

comp.database.ms-access comp.database.ms-access


Discuss Date field that automatically updates record with date last modified (i.e. current date you're editing the field) in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sjboyd81
 
Posts: n/a

Default Date field that automatically updates record with date last modified (i.e. current date you're editing the field) - 09-15-2003 , 04:37 PM






Honestly I can't believe I'm asking this question, since I've worked
on Access for years, but I've been away from it for a bit and for some
reason I'm feeling rusty.
I need to create a date field that automatically updates with the
current date and time each time a record is modified/updated. Do any
of you know how to do that?
Thanks

Reply With Quote
  #2  
Old   
Bradley
 
Posts: n/a

Default Re: Date field that automatically updates record with date last modified (i.e. current date you're editing the field) - 09-15-2003 , 06:41 PM






"sjboyd81" <stacey.boyd (AT) hillandknowlton (DOT) com> wrote

Quote:
Honestly I can't believe I'm asking this question, since I've worked
on Access for years, but I've been away from it for a bit and for some
reason I'm feeling rusty.
I need to create a date field that automatically updates with the
current date and time each time a record is modified/updated. Do any
of you know how to do that?
Thanks
Create a form bound to your recordset. On the AfterUpdate event create a
macro/code that will update the date/time field to the current date/time.

eg.
Private Sub frmMyForm_AfterUpdate()
Me![RecordTimeStamp] = Now()
End Sub

Hope that helps.
--
Bradley
Software Developer www.hrsystems.com.au
A Christian Response www.pastornet.net.au/reponse




Reply With Quote
  #3  
Old   
Ray
 
Posts: n/a

Default Re: Date field that automatically updates record with date last modified (i.e. current date you're editing the field) - 09-16-2003 , 07:56 AM



"Bradley" <bradley (AT) REMOVETHIScomcen (DOT) com.au> wrote

Quote:
"sjboyd81" <stacey.boyd (AT) hillandknowlton (DOT) com> wrote in message
news:bdaeaa.0309151337.6265fd86 (AT) posting (DOT) google.com...
Honestly I can't believe I'm asking this question, since I've worked
on Access for years, but I've been away from it for a bit and for some
reason I'm feeling rusty.
I need to create a date field that automatically updates with the
current date and time each time a record is modified/updated. Do any
of you know how to do that?
Thanks

Create a form bound to your recordset. On the AfterUpdate event create a
macro/code that will update the date/time field to the current date/time.

eg.
Private Sub frmMyForm_AfterUpdate()
Me![RecordTimeStamp] = Now()
End Sub

Hope that helps.
Hello,

Just a quick question. Wouldn't you put that code:

Me![NameOfFieldHere].value = Now()

in the before update property of the form?

Just a question.

Ray


Reply With Quote
  #4  
Old   
Bradley
 
Posts: n/a

Default Re: Date field that automatically updates record with date last modified (i.e. current date you're editing the field) - 09-17-2003 , 09:07 PM



"Ray" <raycait (AT) excite (DOT) com> wrote

Quote:
"Bradley" <bradley (AT) REMOVETHIScomcen (DOT) com.au> wrote

"sjboyd81" <stacey.boyd (AT) hillandknowlton (DOT) com> wrote in message
news:bdaeaa.0309151337.6265fd86 (AT) posting (DOT) google.com...
Honestly I can't believe I'm asking this question, since I've worked
on Access for years, but I've been away from it for a bit and for some
reason I'm feeling rusty.
I need to create a date field that automatically updates with the
current date and time each time a record is modified/updated. Do any
of you know how to do that?
Thanks

Create a form bound to your recordset. On the AfterUpdate event create a
macro/code that will update the date/time field to the current
date/time.

eg.
Private Sub frmMyForm_AfterUpdate()
Me![RecordTimeStamp] = Now()
End Sub

Hope that helps.

Hello,

Just a quick question. Wouldn't you put that code:

Me![NameOfFieldHere].value = Now()

in the before update property of the form?

Just a question.

Ray
Yep probably, I thought about that as I pressed send

One has to watch triggering another Update...
--
Bradley
Software Developer www.hrsystems.com.au
A Christian Response www.pastornet.net.au/reponse




Reply With Quote
Reply




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 On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.