>I am getting an error that tells me that I cannot call an object's SetFocus from a When, Valid, RangeHigh and RangeLow event. What I don't understand is, I am getting this error when the SetFocus command is not actually in the Valid event. The Valid of textbox1 fires and then goes to the GotFocus of textbox2 where my textbox1.SetFocus is called.
>
>I am actually doing this same thing in another form without problems.
>
>Does anyone know where I should look next? Is the fact that the Valid was fired just before the GotFocus of the next textbox the problem?
>
>Is this too vague of an explanation?
It's because the other methods were called from within the valid, and you haven't yet returned to the valid and returned out of it yet.
As long as that valid is still "upstream" in the call stack, you can't issue a SetFocus.
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing