Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ole idispatch exception code 0 from DTPicker
Message
De
06/03/2017 17:36:31
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
06/03/2017 13:38:01
Sonny Tabano
Trams Printwork, Inc.
Mabalacat, Philippines
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01648803
Message ID:
01648809
Vues:
59
>Hi everyone,
>
>need help on how to fix this error and what might have caused this error: ole idispatch exception code 0 from DTPicker
>
>thanks
>
>Sonny

That error should have additional message. Most probably you are trying to set its date using day, month, year properties (which is unnecessary) and doing it in wrong order. If it is the case, correct way of setting those properties is like this:
with oDtPicker
   .Day = 1
   .Year = 2000
   .Month = m.desiredMonth
   .Year = m.desiredYear
   .Day = m.desiredDay
endwith
Better and easier way is to directly set its value to a datetime value. ie:
oDtPicker.Value = datetime()

oDtPicker.Value = cast(date() as datetime)
You may also want to use the dtControl from Foxyclasses which behind the scenes use DtPicker.
Ç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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform