General information
Category:
Forms & Form designer
>I'm wondering if it is related to the calendar being an ActiveX control, and how to fix it.
Actually, after several more hours investigating this, the problem is related to this particular control's bad firing order.
One would assume the BeforeUpdate method should fire before the control's values (day/month/year) are updated to the newly clicked date, thus enabling the developer to act on the old value before refreshing the control.
The MSCAL.OCX changes the YMD values before the BeforeUpdate method fires.
My solution is to load the .tag with DTOC(date()) in Init. In the BeforeUpdate method, call any method that needs the old date before assigning the .tag with DTOC(this.year,this.month,this.day) It works.
I don't understand why MS would include such a poor OOP example in the controls that ship with VFP6.
Previous
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