Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Month View
Message
De
08/02/2003 04:29:53
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Divers
Thread ID:
00750499
Message ID:
00750990
Vues:
16
>I use a text box and a command button which calls a form with the month view control on it. I pass in the date in the text box to the month view control which then sets the month view calendar to the same date as the text box. This works fine until you pass in a date which has more date then the current month for example if I pass in the following date 30/01/2003 and the current month is February which has only 28 days the month view control display an error causing a function argument type or count us invalid.
>
>I think this is a problem with the month view control, has one any ideas on how to fix this?
>
>Thanks
>
>John

John,
If you're setting through .Day, .Month, .Year properties first set them that would accept any day value (ie: 2000/1/31)
with .oleMView
 .Year = 2000 && Known leap year - would work if current is say 2004/2/29
 .Month = 1   && January is known to have 31 days - would work for any day
 .Day = DesiredDay
 .Month = DesiredMonth
 .Year = DesiredYear
endwith
However there is a simplier way :) Directly place the whole value at once :
.oleMview.Object.Value = dtot(myDate)

PS: Also add code to temporarily change MinDate, MaxDate if would use day,month,year approach. Might fall out of range.
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