>Dear all,
>I have a form for get some infos, in this form (GetInfo.scx) I have a command button that in its click event I put Thisform.text1.SetFocus in last line.
>When I run this form separately, it works correctly. But when I call this form from another form with ( DO GetInfo.scx WITH 1,2 ), and when I click command button, I get error 2012 (Cannot call SetFocus from within a When, Valid, RangeHigh or RangeLow event )
>WHY?
Reza
You can't do .SetFocus from a .Valid event. But you say it's in the .click method of the button and that should be OK. Are you sure it is actually the .click event and you didn't accidentally put it in the .valid (done that myself many times)?
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.