Using Access97!!

  • Thread starter Thread starter John Harrop
  • Start date Start date
J

John Harrop

Having real problems with this!!

Date fields that are not populated as such have "suddenly"
started to be populated with 30 December 1899. This is
causing major problems.

The field in question is used to stare the date that a
hore car was actually returned and so it isn't populated
until the car is returned. However, on every record for
cars not yet returned it has 30 December 1899 in it which
is causing havoc as the only way to determine thaqt a
vehicle has not been returned is to test that this field
is null.....which it no longer is

Apart from upgrading Access..any suggestions as to what i
should test for in thei field?
 
John,

The first thing to check would be the Default Value setting for the
field, both in the design of the table and the data entry form. And
otherwise any code on the form which might be assigning a value of 0 to
this field.
 
Thanks Steve

In the table design, it's set up as a Date/Time field.
Format is Long Date.

No default value is specified. Can I specify that the
default value should be 'null'?

Don't have access to the data entry form.....developed
externally using VB. Is it possible that it's the software
that's casuing this?

Can I run ssome SQL to change all occurrences of 20
December 1899 to null?

Lots of questions I know but it's getting desperate as
everytime I get round a problem a new one seems to appear

Thanks again
 
It sounds like the VB application populate the Field with zero since zero is
30/Dec/1899 as per Debug window:

?Format(0, "dd/mmm/yyyy")
30/Dec/1899

Setting Null default value or updating in JET Back-End won't work because
the VB Front-End will still populate new Records with zero values.

You will need to get the VB Front-End modified!
 
Thanks

That was my suspicion. The VB application works fine it's
just that some reports and file extracts that I have
developed using SQL that are having problems. The VB
appplication was externally developed and as far as I know
we have no support for it!!

I'll try testing for 0 in the date field and see what that
does. It's just a pain that it seems to be happening
intermittently. We did not have 30 December 1899 in these
fields a few months ago.

Y2K problem?

Thanks again

John
 
Tested for 0 and all was Okay

Finally got to the bottom of the whole thing though. For
some reason in the date/time field in question the time in
the 'vehicle return date' field was being set to 0. So
when a vehicle was picked up and returned on the same day
the SQL thought that the vehicle had been returned at
midnight on the day that it was returned...which was
before it had been taken out!! Hence the confusion.

A vehicle hired at 9 am today and returned today at 4 pm
would be recorded as having been returned at 00:00:00
today...before it was hired.

Doesn't happen very often and so I've edited the return
time.

Thanks for your help
 
Back
Top