Add a password onto a checkbox - InfoPath Dev
in

InfoPath Dev

Add a password onto a checkbox

Last post 01-31-2006 10:22 AM by dhtroy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-26-2006 07:13 AM

    • jnariss
    • Not Ranked
    • Joined on 11-09-2005
    • USA
    • Posts 2

    Add a password onto a checkbox

    Hello,

    I am in the middle of creating a form and was wondering how I would go about creating a password to add to my form when a users places a checkmark in one of my checkboxes giving it the value of true. So if this checkbox = true, then ask for password and if password is true then continue on with the form.

    I believe I could create a code within the Event Handler's OnBeforeChange - however, I have no idea how to write or start writing the code. I use a password code within my Access database but I know it will not be the same within InfoPath.

    If anyone has any insight on this or could point me into the right direction I would truly appreciate it.

    What I am doing is adding multiple sections with controls into a form that I already created. The original form is called Employee Status Change and it does just that. When an employee is hired or fired, this form gets filled out. Well now my boss wants me to add a link on that form to another form that opens up with options for a new hire. Options of security requests. Instead of creating a new form with a link to that form I simply added a checkbox onto my Employee Status Change form that says "To open Security Requests select the check box". When that check box is equal to true the first hidden section opens letting the user select choices from there. Depending on what choices they select, opens up the next hidden section.

    I tried to create this new section on another form and just place a link from my Employee Status Change form to it but because the new form did not contain any text data fields, it had a problem submitting the data to the database. The Security Requests only contain dropdown boxes and checkboxes. So that is why I adding it to the original Employee Status Change form and just hide it by use of the Security Options checkbox.

    Thanks,
    Justine
  • 01-31-2006 10:22 AM In reply to

    • dhtroy
    • Not Ranked
    • Joined on 01-30-2006
    • USA
    • Posts 8

    Re: Add a password onto a checkbox

    Justine -

    This requires some code behind your form ...

    Firstly, I would like to make a suggestion, that you use a Button over a CheckBox, since a button makes more sense for what you're intending.

    In the click event of that Button you'll need to:

    1. create a connection to your access DB; possibly create a secondary data source to your DB (allowing InfoPath to manage that connection)
    2. Prompt your user for their ID/PWD (you'll obviously have to create this dialog to display)
    3. Run a query against your DB to validate said PWD
    4. Either allow/disallow access to "hidden" area ...



    D.
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.