>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