IF This.Text = "00" ...>We have a textbox which holds a year value and is stored as numeric. I need to determine if the user entered a two digit year (in which case we convert it as below) for the year 2000 (the user would enter 00 then) or if he did not enter any value in which case the variable's value is 0 (it is initialized as 0 throughout the app) and in that case I want to set it to the current year by default. Any ideas? I must be missing something obvious? How to determine if he pressed enter without entering a value or if he entered 00? The below routine is called from the valid of the textbox for mvh_year which is initialized to 0 when it is created:
>PARAMETERS CurrentYear > >PRIVATE iYear, iEpoc >iYear = CurrentYear >iEpoc = 20 > >DO CASE >CASE CurrentYear = 0 > iYear = 2000 >CASE CurrentYear < iEpoc > iYear = 2000 + CurrentYear >CASE CurrentYear < 100 > iYear = 1900 + CurrentYear >ENDCASE > >RETURN iYear >