Access Form Calendar 1899

L

ll

I currently am using the VBA Calendar object with my Access form, and
if I click on today's date in the calendar, it returns 12/31/1899.
I've tried assigning 'now' as the default value for my text box which
holds the date from the calendar, but that didn't alter things. Would
there be a property within the calendar object itself that would allow
the correct date to be displayed?

Thanks,
Louis
 
S

storrboy

I currently am using the VBA Calendar object with my Access form, and
if I click on today's date in the calendar, it returns 12/31/1899.
I've tried assigning 'now' as the default value for my text box which
holds the date from the calendar, but that didn't alter things. Would
there be a property within the calendar object itself that would allow
the correct date to be displayed?

Thanks,
Louis

Try using Date() as the default value.
As for the odd date being returned, it sounds like something is being
referenced wrong in code or as a control reference - for instance a
numerical value less than or equal to one would return the date you
encounter when that number is converted to a date. To see this type
the following into the immediate window

?CDate(1) 'Displays 12/31/1899
 

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