Querying a form executes OnBeforeChange code? - InfoPath Dev
in

InfoPath Dev

Querying a form executes OnBeforeChange code?

Last post 10-14-2005 01:53 PM by franck. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-13-2005 05:04 PM

    Querying a form executes OnBeforeChange code?

    Gday,

    Hopefully there exists a simple solution to my dilema:
    I have coded a function tied to the OnBeforeChange of a checkbox -
    function myCheckbox::OnBeforeChange(eventObj){
    //some code
    if myCheckbox is checked
    Alert ("unchecked")
    else
    Alert ("checked")
    }

    The problem is, when i requery the form using a drop downbox. the code above is executed. have i done something fundamentally wrong? Is there workaround for this.

    Cheers
  • 10-14-2005 01:33 PM In reply to

    Re: Querying a form executes OnBeforeChange code?

    I'm not exactly sure how these functions behave but from my understanding onBeforeChange is going to fire A LOT more than onAfterChange(). If you switch your function to onAfterChange() it will probably only fire when you actually change the value of one of the fields.

    ---------------
    Matt Faus
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 10-14-2005 01:53 PM In reply to

    Re: Querying a form executes OnBeforeChange code?

    Why is it an issue? If you have code there that shouldn't be executed when nothing changed in your drop-down, you could compare OldValue to NewValue. If they are equal, you can exit and bypass your code...

    Franck Dauché
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.