Recording the Date and Time When a Record is Modified in Access

T

Tina I. Smith

Hello,
I used the 'BeforeUpdate' procedure for a form to record the date and time a
record has been modified and the date that appears on the form and on the
table is not right.

For example I editied a record and expected the date to be 10/18/2007, but
instead the form is showing 12/30/1899. The table has also been updated with
this date. The time is correct but the date is wrong.

Could someone please tell me how to correct this?

Thanks,
Tina I. Smith, MBA
Manulife Financial
Financial Analyst II
US Support Operations
 
D

Douglas J. Steele

What's the code you're using in the BeforeUpdate event?

A date of 12/30/1899 corresponds to a value of 0, so perhaps you forgot to
set the value of the variable.
 
M

Marshall Barton

Tina said:
I used the 'BeforeUpdate' procedure for a form to record the date and time a
record has been modified and the date that appears on the form and on the
table is not right.

For example I editied a record and expected the date to be 10/18/2007, but
instead the form is showing 12/30/1899. The table has also been updated with
this date. The time is correct but the date is wrong.


Hard to tell without seeing your code. The general idea is
use:
Me.datetimefield = Now
 
T

Tina I. Smith

Hey Douglas,
Thanks you so much for the speedy response. I have been looking at this all
day and can't figure it out. I actually linked a macro called 'LastModified'
to the BeforeUpdate form property. The macro is suppose to be doing a
'SetValue' on the [Date-Modified] field in a table to the 'Expression' Date()
or system date. Not sure I'm saying this right. Could there be something
wrong with my system date?

Thank U so much!
Tina.
 
P

Pieter Wijnen

rule #1 move from macros to vba code ASAP

Pieter

Tina I. Smith said:
Hey Douglas,
Thanks you so much for the speedy response. I have been looking at this
all
day and can't figure it out. I actually linked a macro called
'LastModified'
to the BeforeUpdate form property. The macro is suppose to be doing a
'SetValue' on the [Date-Modified] field in a table to the 'Expression'
Date()
or system date. Not sure I'm saying this right. Could there be something
wrong with my system date?

Thank U so much!
Tina.

Douglas J. Steele said:
What's the code you're using in the BeforeUpdate event?

A date of 12/30/1899 corresponds to a value of 0, so perhaps you forgot
to
set the value of the variable.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
 
T

Tina I. Smith

LOL...I'm trying Pieter. Took classes, even have Visual Basic .NET but I
haven't been able to apply the time I need to be confident in using VBA
codes.

Tina.

Pieter Wijnen said:
rule #1 move from macros to vba code ASAP

Pieter

Tina I. Smith said:
Hey Douglas,
Thanks you so much for the speedy response. I have been looking at this
all
day and can't figure it out. I actually linked a macro called
'LastModified'
to the BeforeUpdate form property. The macro is suppose to be doing a
'SetValue' on the [Date-Modified] field in a table to the 'Expression'
Date()
or system date. Not sure I'm saying this right. Could there be something
wrong with my system date?

Thank U so much!
Tina.

Douglas J. Steele said:
What's the code you're using in the BeforeUpdate event?

A date of 12/30/1899 corresponds to a value of 0, so perhaps you forgot
to
set the value of the variable.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
Hello,
I used the 'BeforeUpdate' procedure for a form to record the date and
time
a
record has been modified and the date that appears on the form and on
the
table is not right.

For example I editied a record and expected the date to be 10/18/2007,
but
instead the form is showing 12/30/1899. The table has also been updated
with
this date. The time is correct but the date is wrong.

Could someone please tell me how to correct this?

Thanks,
Tina I. Smith, MBA
Manulife Financial
Financial Analyst II
US Support Operations
 
P

Pieter Wijnen

But using stone age macros, you'll do? <g>

Pieter

Tina I. Smith said:
LOL...I'm trying Pieter. Took classes, even have Visual Basic .NET but I
haven't been able to apply the time I need to be confident in using VBA
codes.

Tina.

Pieter Wijnen said:
rule #1 move from macros to vba code ASAP

Pieter

Tina I. Smith said:
Hey Douglas,
Thanks you so much for the speedy response. I have been looking at this
all
day and can't figure it out. I actually linked a macro called
'LastModified'
to the BeforeUpdate form property. The macro is suppose to be doing a
'SetValue' on the [Date-Modified] field in a table to the 'Expression'
Date()
or system date. Not sure I'm saying this right. Could there be
something
wrong with my system date?

Thank U so much!
Tina.

:

What's the code you're using in the BeforeUpdate event?

A date of 12/30/1899 corresponds to a value of 0, so perhaps you
forgot
to
set the value of the variable.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
Hello,
I used the 'BeforeUpdate' procedure for a form to record the date
and
time
a
record has been modified and the date that appears on the form and
on
the
table is not right.

For example I editied a record and expected the date to be
10/18/2007,
but
instead the form is showing 12/30/1899. The table has also been
updated
with
this date. The time is correct but the date is wrong.

Could someone please tell me how to correct this?

Thanks,
Tina I. Smith, MBA
Manulife Financial
Financial Analyst II
US Support Operations
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top