Need inspiration for a pretty simple problem
1. I have an array of 6 textboxes.
2. On the "LostFocus" event I call a check routine. If criteria is met in this routine then I enable a "Submit" button.
The problem/issue I have is this .....
Either :
a) Because the enabled property of the "Submit" button is being set to true AFTER I move off textbox number 6, i.e. in the lostfocus event, the focus has moved to my "Clear" button. I don't want this. I want the focus to be on the "Submit" button.
b) If I put a "SubmitButton.SetFocus" in the check routine, assuming all is ok, then what happens when you Shift/TAB off of the submit button it goes to textbox 6. Great. If you Shift/TAB again it fires the LostFocus event, which in turn matches the criteria, which in turn set the focus back on the "Submit button", so thats obviously less than ideal.
I hope I haven't made this sound confusing.
There HAS to be a simple solution.
Any takers ?
Re: Need inspiration for a pretty simple problem
Using the "CausesValidation" property and shoving my code in the Validate event sorts me out.
I KNEW there was a simple answer :)
Re: Need inspiration for a pretty simple problem
Re: Need inspiration for a pretty simple problem
It is now.
I did put a "Resolved" tick against the thread.