Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datetime picker control question
Message
From
08/11/2001 22:54:29
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Datetime picker control question
Miscellaneous
Thread ID:
00579507
Message ID:
00579507
Views:
51
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
Map
View

Click here to load this message in the networking platform