Hi!
If your form is modal, and is called from the Valid event of the control on another form, you will get this error almost always when using SetFocus, not only when using it in the LostFocus event. Just call your form from LostFocus event instead.
>Hi,
>
>I have written some validation code in one text box lostfocus event. I want my cursor should be there till it receive actual value. I am writing one line in next text box gotfocus.
>thisform.text1.setfocus
>its giving error cannot call setfocus from when valid.rangelow,range high..even ..while I am not using any of those event. my cursor skip to text2 automatically...even without geting actual value.
>
>Please advice.
>
>Another I want to put splash screen at initial of my project for some second than i wopuld like to call my password verification screen.
>Please help.
>
>Thanks & best regards,
>
>Sajjad
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.