>>>I am trying to implement the VFP 5 ActiveX Date/Time picker for the first time and the refresh is generating an error '0x80020005 Type Mismatch'.
>>>Initially, I used a date/time field as the control source with date() in the actual table, then I switched to a character containing '2001/09/29'.
>>>Can anyone offer any advice?
>>>TIA.
>>
>>Allan,
>>It doesn't accept other than datetime. Directly binding it is problematic. Use an intermediate textbox IMHO (assigning value would be via DTPicker.object.value not DTPicker.value).
>>Cetin
>
>Cetin,
>
>As you can see, I am new at this ActiveX:(!
>I do not see a 'value' property in the list of properties.
Allan,
Yes in PEM sheet it doesn't exist. But it has a value property. You can see it has a value property :
-Righclick and select 'Dtpicker properties'
or :
-Click F1 on it and in online help check its properties.
or :
-Put a textbox control on a form and datetimepicker control (dtpicker). 2 commandbuttons
1st commandbuttonclick :
ThisForm.Text1.Value = ThisForm.dtpicker.object.value
2nd button click :
ThisForm.dtpicker.object.value = thisform.text1.value
FWIW Dtpicker control is a sucker to use with VFP. Monthview is more controllable. For a sample download and check FoxyClasses samples.
Cetin