Select to view content in your preferred language

If checkbox is "false", how can I make associated page read only?

588
1
07-10-2013 06:51 AM
jeffclonts
Emerging Contributor
Hi

I have created forms for a stream channel inventory. On the first page of the form the user can select from a list of four deficiencies (joint, bottom slab, vegetation, deposition). Each deficiency has a page associated with it that allows the user to collect more information. If the user does not select the checkbox for a particular deficiency, I want the associated page to be read only or grayed out to where the user can not enter any information.

Thanks

jc
Tags (3)
0 Kudos
1 Reply
DanikBourdeau2
Deactivated User
The way to do it is to make the controls on the pages either visible or invisible.  Use the onClick event for each of your checkboxes to add code that makes the controls for the unnecessary pages invisible.

Sub Chk1OnClick

'Check to see if the value of your checkbox is true
If Chk1.Value = true Then

   'Turn visibility to false for all controls of a specific page
   For Each fi in Applet.Forms(frm).Pages(p).Controls
      Applet.Forms(frm).Pages(p1).Controls(fi.Name).Visible = 0
   Next
End If

'You may need to add more code for when the checkbox is unchecked

End Sub
0 Kudos