if you dont wanna change your SET MonthNames format (which would automatically makes u able to compare the month "February" with number 2 for example) then you could use this:
RECNO() AS Month_Number,
resident MyTable while RecNo()<=12;
This way you can use Month_Number when u need to compare the month as text, having it associated with MyMonthName.
The Month() function should do what you need. It returns a dual value, with a text representation of Jan, Feb, Mar... and a numeric value 1, 2, 3.If your data table also contains a Year field (like the script below), then you can select records for that month and year if you create listboxes for MyMonthName and MyYearName:
LOAD TranDate AS Date,
Month(TranDate) AS MyMonthName,
Year(TranDate) AS MyYearName,
If you must get the date as a value when the Month and Year are selected in listoxes, then I suggest that you create a variable like this in your script:
Set vMyDate = MakeDate(myYearName, MyMonthName);
Now vMyDate will contain 1.1.2010 when Jan and 2010 are selected. It will contain null if no month or no year is selected.
Hope that helps