General information
Category:
Forms & Form designer
Hi,
>I have a strange problem in a combobox control.
>
>The idea is to have a list of 12 "months" in character format.
>
>The code is placed in the form's INIT by creating an array comprising 12 months, using a dummy date, and extracting cmonth from it, in a monthly incremental For-Endfor loop.
>
>The problem, is that when the datasession is in default mode, the "months" work out perfectly. But the moment the form turns to a private datasession, which I need, I get an array of 12 months, all amounting to "January".
>
>Does someone know what's wrong?
>
>Regards,
>
>Steve
>
>The Code:
>PUBLIC armonth
>dimension ArMonth(12)
>FOR x=1 TO 12
> lddate=CTOD("01/"+alltrim(str(x))+"/"+ALLTRIM(STR(YEAR(GDDATE)))) *Using a dummy year as a base to get 12 months
> Armonth(x)=cmonth(lddate)
>ENDFOR
SET DATE is scoped to the datasession and the default is AMERICAN. Looks like you're expecting it to be BRITISH or similar..
HTH,
Viv
Previous
Next
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