Calendar Control Problem

J

Jody

I have a database that tracks sales rep activities. Two
fields on my activity form are:
ActivityDate and Time (for which the options are AM, PM or
All Day)
Both fields are keyed.
Example: Date: 9/14/04
Time: AM

A calendar control control is used to enter the date.
When entering a new activity and as an example 9/14/04 is
selected from the calendar control the date is entered
correctly. However when the user enters a new activity for
the same day (PM) and selects 9/14/04 from the calendar
control, the date that shows up in the date field is
12/30/1899. At this point you need to click on the date
field again to re-select the correct date. And then the
date is entered correctly. This can be quite annoying.
And there are times when people don't realize the wrong
date has been entered.

Any ideas why this 12/30/1899 is showing up and what I
should do to keep it from happening?

Thanks.
 
M

Michel Walsh

Hi,


The 30th December 1899 is the day zero. It may be that either a
default value of 0 is used, either a # delimiter is missing, and 1/2/3 is
read as 1 divided by 2 divided by 3, which is sometimes between day 0 and
day 1, rather than being the second of January 2003 (in US), or as the first
of February 2003.


Hoping it may help,
Vanderghast, Access MVP
 
J

Jody

Thanks for the reply. Since I'm fairly new to VB, what
can I do to correct this or prevent this from happening?

Thanks.
 
M

Michel Walsh

Hi,


If it is the case of a default value, try to set the default value to
Now. As example, if it is bound to a field in a table, then, in design mode
of the table, have the default value, for that field, assigned to:

= Now( )


or


= Date( )


(now supplies the time, in addition to the day, date just supplies the day).



Hoping it may help,
Vanderghast, Access MVP
 
J

Jody

Thank you. It's seems to be working now.
-----Original Message-----
Hi,


If it is the case of a default value, try to set the default value to
Now. As example, if it is bound to a field in a table, then, in design mode
of the table, have the default value, for that field, assigned to:

= Now( )


or


= Date( )


(now supplies the time, in addition to the day, date just supplies the day).



Hoping it may help,
Vanderghast, Access MVP





.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top