G
Guest
Access 2003
I have been running into an issue in the past few days that has been
puzzling me, and I have not been able to find a reason for it. If I use VBA
code to set a date value on a table, the value that gets saved to the table
is a time between 12:00:01 AM and 12:00:51 AM. It is always the same time for
a given date, but the time shifts depending on what date I am trying to
assign. I have used the Date() and Now(), DateSerial, and even a combination
of DateDiff and DateAdd, and they are all doing this.
It is doing it on older tables as well as fresh testing tables, and it is
doing it regardless of what formatting I have applied to the field on the
table. If anything it does it more consistently if the format is set to Date
- Short Date. It does it if I type the date into a text box or create the
date from code.
If I am not typing directly on the table then it converts the date to time.
Any ideas of what is going on?
I have been running into an issue in the past few days that has been
puzzling me, and I have not been able to find a reason for it. If I use VBA
code to set a date value on a table, the value that gets saved to the table
is a time between 12:00:01 AM and 12:00:51 AM. It is always the same time for
a given date, but the time shifts depending on what date I am trying to
assign. I have used the Date() and Now(), DateSerial, and even a combination
of DateDiff and DateAdd, and they are all doing this.
It is doing it on older tables as well as fresh testing tables, and it is
doing it regardless of what formatting I have applied to the field on the
table. If anything it does it more consistently if the format is set to Date
- Short Date. It does it if I type the date into a text box or create the
date from code.
If I am not typing directly on the table then it converts the date to time.
Any ideas of what is going on?