[RESOLVED] Case Statement ignore capitals
Hi
I'm trying to add some validation to a text field in which the user is supposed to enter a month name. I'm wanting to check that the input is equal to one of the months of the year. I thought I could do a case statement e.g.
Select Case month.Text
Case "January"
etc........
However, it is possible that the user would enter "january" rather than "January". Is there any way that I can check the input and ignore the case so that I don't have to double the length of the select statement by putting in each month with and without a capital letter?
Re: Case Statement ignore capitals
Hi, just convert the whole string to upercase or lower case
VB Code:
select case month.text.toupper
case "JANUARY"
'...
Re: Case Statement ignore capitals
Quote:
Originally Posted by josep
Hi, just convert the whole string to upercase or lower case
VB Code:
select case month.text.toupper
case "JANUARY"
'...
Thanks Josep, that worked well!