Access 2007 Macro

  • Thread starter Thread starter Kay
  • Start date Start date
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?
 
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.
 
Back
Top