Results 1 to 4 of 4

Thread: Need inspiration for a pretty simple problem

  1. #1

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Resolved 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 ?
    Last edited by TheBionicOrange; Jul 7th, 2006 at 04:31 AM.

  2. #2

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    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

  3. #3
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: Need inspiration for a pretty simple problem

    Is it resolved then?
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  4. #4

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Re: Need inspiration for a pretty simple problem

    It is now.

    I did put a "Resolved" tick against the thread.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width