Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change the date, year and month
Message
De
15/01/2002 12:20:22
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
 
 
À
15/01/2002 12:14:53
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00604905
Message ID:
00604927
Vues:
19
Thank you for your response Cetin. It is the OleControl1. It has drop-down combobox for month and year and has the dataepicker below it.

>BTW which OLecontrol is this. The ones I know already have those navigations built-in.
>Cetin
>
>>>Hi all:
>>>
>>>I have aform which has an OLEControl (calendar)in it. I have also added three command button named This Year, This Month and This Week. I also plan to use buttons with directional arrows to enable the user to scroll through another year, another month another week or the previous year, month and week.
>>>
>>>Objective: Clicking any of the buttons should change the data, month and year displayed in the OleControl to:
>>>
>>>1. This Year = current date
>>>2. This month = current date
>>>3. This week = current date
>>>
>>>The following code did not work for me.
>>>
>>>
thisform.oleControl1.year.value = year()
>>>thisform.oleControl1.month.value = month()
>>>thisform.oleControl1.day.value = date()
>>>
>>>Am I on the right track? TIA.
>>>
>>>- Ravi
>>Ravi,
>>If it's datetimepicker control then there isn't 'value' property for year, day, month :
>>
>>
*If an issue first set MinDate to a low value.
>>with thisform.oleControl1
>> .Month = 1 && A known month with 31 days
>> .day = 1 && Every month has it
>> .year = year(date()) && Now can change w/o worry
>> .month = month(date())
>> .day = day(date())
>>endwith
But there is a shorter way :
>>
>>thisform.oleControl1.OBJECT.value = datetime()
>>
>>Cetin
- Ravi

True greatness consists in being great in little things.
- Charles Simmons
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform