MS Date and Time Picker Control defaults to today's date

G

Guest

I am using a outlook2002+sp2 custom message form.
I have placed the DTPicker1 control(MSCOMCT2.OCX) on the form and it is bound to a custom field of type date
I run this custom form and change the date in the dropdown box and send this form to another
person. When he opens the form, the DTPicker controls defaults to today's date why?
It does not retain the selected date.

Any help will is greatly appreicated.
 
A

Andrew Cushen

Not sure about doing this on a form in Outlook, but when I
use the DTPicker in VB 6.o, I set the starting date in
code in the formload event for the form like this:

DTPicker1.Value = Date

which sets the calendar to today's date. You can set it to
a specific date like this:

DTPicker1.Value = "June 5, 2004"

Changing the date in the control itself won't work. You
need to either set the Value property in the Properties
window (hit F4 to open it if it's not open) when designing
the form, or do it in code at runtime like above.

Hope that helps,

-Andrew Cushen
-----Original Message-----
I am using a outlook2002+sp2 custom message form.
I have placed the DTPicker1 control(MSCOMCT2.OCX) on the
form and it is bound to a custom field of type date
I run this custom form and change the date in the
dropdown box and send this form to another
 

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