Access 2007 Macro

K

Kay

Hello all,

I have a macro on the before update property of a form that sets the value
of a field that records the modified date for a record. the Action is
"setvalue", the item is [lastupdate], the expression is date(). It returns
December 30, 1899. Shouldn't it return my system date?
 
J

John W. Vinson

Hello all,

I have a macro on the before update property of a form that sets the value
of a field that records the modified date for a record. the Action is
"setvalue", the item is [lastupdate], the expression is date(). It returns
December 30, 1899. Shouldn't it return my system date?

Try changing it to "#" & Date() & "#"

December 30, 1899 is the zero point of the Access Date/TIme value. It's
possible that the field is being set to 9/1/2009 - interpreted as nine divided
by one divided by 2009, 4.47984071677451E-03, equivalent to
#12/30/1899 12:06:27 AM#.

Alternatively, it's possible that your field is somehow (after this macro
step) getting set to 0.

You might be able to distinguish by displaying the field in Long Date format
to see if it has a time component.
 

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