Date field fills up with junk - crashes Access

  • Thread starter Thread starter M Skabialka
  • Start date Start date
M

M Skabialka

I have an unbound form where there is a date field. It is set up as short
date format, with the default value =Now() when the form opens.

However the form crashes Access 97 when it is opened and I have inserted
code to find out what is going on. It seems that the value of this field
changes to random pieces of VB code, etc, whenever the form is opened.

e.g. instead of 3/4/04 it has said "DayWorked" (which happens to be the
field name), or another time it was "Form_Open". At other times it is
strange non-ASCII characters. Since I have code which uses this date field,
and the value for no reason changes to non-date data, it crashes Access.

I have tried recreating the form, copying the form, decompiling and
recompiling the database, repairing, compacting ... have I forgotten
something I could try?

Meanwhile the rest of the forms, reports etc have no problems in this
database.

What could be causing this? It's as though it is reading some random piece
of memory instead of using the data information it should have.

Any suggestions much appreciated.

Thanks,
Mich
 
Yes, I tried all variations of Now(), Now, Date() and Date.
I finally removed that field completely and used a new field with no default
setting. I set it in code when the form opens. Never did figure the
problem out, but have moved on...
Mich
 
Back
Top