M
mike_dowler
Guest
Hi - I would appreciate some help please. I would like to be be able to declare a variable as an integer, and specify that the integer should have a value only between 1 and 6. Ideally, any value outside that range would produce an error condition, which I could then use to trigger another event.
The reason, if you're interested (& in case you can think of an alternative solution) is that I have 6 text boxes on a form, which are populated in order with messages that apply (i.e. TextBox1 to TextBox6) by using Me("TextBox" & n) where n is incremented by 1 each time. Sometimes there might be more than 6 relevant messages, but I want to avoid the program looking for TextBox7 (as it doesn't exist).
Any ideas please?
Mike
The reason, if you're interested (& in case you can think of an alternative solution) is that I have 6 text boxes on a form, which are populated in order with messages that apply (i.e. TextBox1 to TextBox6) by using Me("TextBox" & n) where n is incremented by 1 each time. Sometimes there might be more than 6 relevant messages, but I want to avoid the program looking for TextBox7 (as it doesn't exist).
Any ideas please?
Mike