Date/Time control

goyalpr

New member
Local time
Today, 19:10
Joined
Jul 9, 2003
Messages
8
Hi,

Would it be possible to have a dynamic default date (a function of current date) for the Date/Time Activex control. If I try to set the value in Form_Load (Dtcontrol.value = Now - 30), I get an error as this property is read-only.

I want deault date value to be something like (Now - 30) and (Now + 30).

Thanks,
Prashant
 
I think the only way to do this is to use the Control Source Property of the ActiveX Control. Then by changing the Data in the table that it is based on you can set it 30 days ahead or behind.

I normally set the activex control into a subform based on a table with one record that controls the date.

Hope this helps
 
Use the default property of the dtpicker and use hidden textboxes or variables to work with the values

datetimepickerFrom = Date
datetimepickerTill = Date - 8
txtFrom = Format(datetimepickerFrom, "mm/dd/yy")
txtTill = Format(datetimepickerTill, "mm/dd/yy")
 

Users who are viewing this thread

Back
Top Bottom