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 » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How can I make the date field change automatically when I make a .



 
 
Thread Tools Display Modes
  #1  
Old January 12th, 2005, 04:13 PM
Ngina 28
external usenet poster
 
Posts: n/a
Default 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  
Old January 12th, 2005, 04:47 PM
Lynn Trapp
external usenet poster
 
Posts: n/a
Default

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  
Old February 14th, 2005, 10:51 PM
Tony
external usenet poster
 
Posts: n/a
Default

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  
Old February 14th, 2005, 11:05 PM
Rick B
external usenet poster
 
Posts: n/a
Default

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  
Old February 14th, 2005, 11:43 PM
Tony
external usenet poster
 
Posts: n/a
Default

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  
Old February 15th, 2005, 03:54 PM
Rick B
external usenet poster
 
Posts: n/a
Default

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  
Old February 15th, 2005, 03:54 PM
Rick B
external usenet poster
 
Posts: n/a
Default

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

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
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


All times are GMT +1. The time now is 11:06 PM.


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