VB code to modify checkbox control - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

VB code to modify checkbox control

Last post 04-13-2009 07:04 PM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-13-2009 08:47 AM

    VB code to modify checkbox control


    I'm sort of an InfoPath noob and I get the basic idea behind programming InfoPath with VB, however I am having issues setting the value for a checkbox. I am using VB.NET 2005 to validate several controls once the checkbox is enabled. I know I could use rules and whatnot, but validating all it through rules can be cumbersome and I've had issues in the past with it. I tried using the SetValue method to reset the value of a checkbox if the user enters the wrong data, but I get runtime errors.

    Would anyone know how to uncheck the control. I just wish there was an "unchecked" property like in a Windows form.

    Thanks in advance!

  • 04-13-2009 07:04 PM In reply to

    Re: VB code to modify checkbox control

    To uncheck a checkbox, you need to set the value of the field bound to the checkbox to the checkbox's off value.  If it's a boolean field, the off value would be false and otherwise it would be no by default unless you changed the settings.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.