Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DatePicker problem
Message
From
31/10/2003 11:19:19
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
31/10/2003 11:04:09
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00845012
Message ID:
00845029
Views:
11
>Hi,
>
>I'm using the OLEclass 'MSComctl2.DTpicker.2' in my application to allow the users to pick a date using the calendar. Sometimes I have to programmatically change the value of the olecontrol...
>
>************
>
>Local lcDate
>lcDate = iif(!Empty(Deals.Nextcalc),Deals.Nextcalc,Date())
>
>this.parent.olecontrol1.day = day(lcdate)
>this.parent.olecontrol1.month = month(lcdate)
>this.parent.olecontrol1.year = year(lcdate)
>
>************
>
>...everything is Ok until the day of the new date is the 31st of the month,
>Then code line 'this.parent.olecontrol1.day = day(lcdate)' generates the error 'Invalid property value'.
>
>Any clues about what's going on?
>
>Thanks in advance.
>
>Paco Calvente
>Logotech Systems

Paco,
Either do it first setting the month to one with known to have 31. ie : Jan then set it.
Or take the eaiser path and set at once:
this.parent.olecontrol1.object.value=dtot(lcDate) && assuming lcDate is D
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform