Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Works in VFP 7 but not in VFP 6
Message
De
22/05/2002 13:27:33
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00660000
Message ID:
00660028
Vues:
18
This message has been marked as the solution to the initial question of the thread.
>I'm using the following commands in the show method of a form to set a DTPicker control:
>
>
>thisform.olecontrol1.objECT.Month=MONTH(DATE())
>thisform.olecontrol1.objECT.Day=DAY(DATE())
>thisform.olecontrol1.object.Year=YEAR(DATE())
>
>
>This code works in VFP 7 (I used it because of intellisense), but when I ran in form in VFP 6 I get the error message saying:
>
>
>OLE error code 0x80020005: Type Mismatch
>
>
>It occurs on all three lines.
>
>The OleClass of the control is MSComCT2.DTPicker.2
>
>
>Any thoughts.
>
>Kirk

Kirk,
Directly set object value or do not use object at all :
thisform.olecontrol1.objECT.Value=DTOT(ldDATE) && dtpicker expects dt

*Or :

with thisform.olecontrol1
 .Year = 2000
 .Month = 1
 .Day = day(ldDate)
 .Month = month(ldDate)
 .Year = year(ldDate)
endwith
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform