General information
Category:
ActiveX controls in VFP
Title:
Datetime picker control question
I am using the MS Datetime picker ActiveX control on a form and would like to conditionally change the controlsource property of the control to "" whenever there is an empty/null date field to avoid OLE dispatch error that results when the controls encounters an empty/null date.
I have put the following code in the init method of the form.
if empty(invhdrdate)
thisform.txtcal.controlsource=""
endif
invhdrdate is a date field from a table, txtcal is my datetime picker control.
When this code is run, I am getting "OLE Dispatch Error..Property is readonly".
How can I avoid this ? Is there anyway to code around the empty/null date issue with the datetime picker control ?
I am using VFP 7.0
Thank you.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only