=Now() displays wrong date

  • Thread starter Thread starter ebwhittaker
  • Start date Start date
E

ebwhittaker

I have a field that the default is =Now() and when the database is loaded it
displays the wrong data, usually several weeks earlier than the correct date.

I am using Access2002
 
Using Now() as a default value means that when you create a new record in
the table (in which the field has Now() for a default), Access will stick
the current date/time IN THAT NEW RECORD.

If you are expecting Now() to ALWAYS show the current date/time, you need to
ALWAYS be storing a new record.

Where are you doing this? Are you using a form? What field is the control
w/ Now() bound to?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
OK, When I open the form it displays the incorrect date. This is a date/time
table field. The curious thing is that it does NOT happen on my computer,
but on the customers computer that is running AccessRuntime2007 which I use
even though I am using Access2002. I don't know if that could possibly make
a difference but if I select New Record then the field will show the correct
date. It is only when the form is first opened and a blank record is
displayed.
 
I have a field that the default is =Now() and when the database is loaded it
displays the wrong data, usually several weeks earlier than the correct date.

I am using Access2002

Are you certain that it's not displaying a stored value which was in fact
entered several weeks earlier? The Default value applies only to newly created
records. Is there data in any other fields in the table?

And does your computer clock in fact show today's date? (never overlook the
trivial solution...)
 
Where is the default is =Now() used in the application?
As field default in a table?
As a text box default in a form?
 
I don't know if that could possibly make
a difference but if I select New Record then the field will show the correct
date. It is only when the form is first opened and a blank record is
displayed.

It sounds like there is a record (the first record in the form's
recordsource), actually stored in the table, with the date the record was
created in this field and NULL values in all the other fields. Since it's an
existing record the Default Value will not apply.

Perhaps you should just delete this record if it does not contain any useful
data. Then you'll see the first "real" record (first in terms of the sort
order of the recordsource, which might or might not be chronological), with
whatever date that record contains.
 
Back
Top