Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ole idispatch exception code 0 from DTPicker
Message
From
07/03/2017 11:04:23
Sonny Tabano
Trams Printwork, Inc.
Mabalacat, Philippines
 
 
To
06/03/2017 16:36:47
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01648803
Message ID:
01648830
Views:
98
Hi Antonio,

Set century is on and date format is mm/dd/yyyy. Is this the one your asking?

Here is the code: .OleDatePicker4.Change (EndDate)
LOCAL lcMonth, lcDate, lcDay, lcYear, lcTime

With This
     lcDay   = STR(.Day,2)
     lcYear  = STR(.Year,4)
     lcMonth = STR(.Month,2)
*     lcTime  = str(.Time())
     lcDate  = lcMonth +"/" + lcday+"/"+lcYear

     WITH ThisForm
          .txtEndDate.Value=ctod(lcDate)
*          .txtEndDate.setfocus()

**** Check if end date (.OleDatePicker4) is earlier than start date (. (OleDatePicker3)
		 IF .txtEndDate.Value <= .txtStartDate.Value
	             .txtStartDate.Value=.txtEndDate.Value - 1

*** Replace the following 
		     .OleDatePicker3.Month=MONTH(.txtStartDate.Value)
		     .OleDatePicker3.Day=Day(.txtStartDate.Value)
		     .OleDatePicker3.Year=Year(.txtStartDate.Value)

		 ENDIF		 		 
     ENDWITH     
ENDWITH
the error happens only on these dates between April 1-3, for example when startdate is April 2 and enddate is april 3, when i change enddate to april 1, startdate shlould change to Mar 31. but it doesn't change on the date picker and this error message appears, but it does change the value on the (textbox) .txtStartdate


Thanks,

Sonny
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform