DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    shachar Guest

    the lost-focus event


    hello.
    on my form form i have 2 text-boxes txtA , txtB
    and i have a lot of other controls.
    i want to check the data that was enterd to txtA after the user finshes entering
    it and clicking on other control.
    BUT i dont want to check it if the user click on txtB.
    how can i do it?



  2. #2
    Craig Brown Guest

    Re: the lost-focus event


    Shachar,

    In the LostFocus event how about calling a subroutine/function with the control
    name? In the subroutine/function check the control's name property and then
    process your LostFocus accordingly.

    Craig Brown

    "shachar" <muli4@internet-zahav.net> wrote:
    >
    >hello.
    >on my form form i have 2 text-boxes txtA , txtB
    >and i have a lot of other controls.
    >i want to check the data that was enterd to txtA after the user finshes

    entering
    >it and clicking on other control.
    >BUT i dont want to check it if the user click on txtB.
    >how can i do it?
    >
    >



  3. #3
    G. Allen Guest

    Re: the lost-focus event


    What you need to use is the form's ActiveControl.Name property. In the LostFocus
    event of txtA check to see if Me.ActiveControl.Name = "txtB". If it does
    then don't process your LostFocus code.

    "shachar" <muli4@internet-zahav.net> wrote:
    >
    >hello.
    >on my form form i have 2 text-boxes txtA , txtB
    >and i have a lot of other controls.
    >i want to check the data that was enterd to txtA after the user finshes

    entering
    >it and clicking on other control.
    >BUT i dont want to check it if the user click on txtB.
    >how can i do it?
    >
    >



  4. #4
    thomas Guest

    Re: the lost-focus event


    Try to use the validate event and set the next control cause validate to true.
    Lost focus and got focus is outdated.

    bye.

    MCP x 2



    "G. Allen" <gallenspam@worldnet.att.net> wrote:
    >
    >What you need to use is the form's ActiveControl.Name property. In the

    LostFocus
    >event of txtA check to see if Me.ActiveControl.Name = "txtB". If it does
    >then don't process your LostFocus code.
    >
    >"shachar" <muli4@internet-zahav.net> wrote:
    >>
    >>hello.
    >>on my form form i have 2 text-boxes txtA , txtB
    >>and i have a lot of other controls.
    >>i want to check the data that was enterd to txtA after the user finshes

    >entering
    >>it and clicking on other control.
    >>BUT i dont want to check it if the user click on txtB.
    >>how can i do it?
    >>
    >>

    >



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links