From: Fabes346 on
I have a script that just about working the way I want it to. I'm using a
MultiPage with 13 pages in the Outlook form. I am using checkboxes to make
the pages visible and add recipients to the To field. When the checkbox is
unchecked, the page and the recipient disappear (as designed).

During testing of the form, I checked all checkboxes and filled out every
field on every page of the form and sent it. The form went to the correct
mailboxes as intended. Unfortunately, none of the checkboxes stayed checked
and the twelve pages I filled out within the MultiPage disappear. Rechecking
them doesn't make them reappear. If you go into design mode, you can see all
the info I entered on the pages.

The Send form definition box is checked on the Properties tab of the form.
Any ideas on how to make the checkboxes stay checked? I've included my script
below.

Thanks, Todd


Dim objPage, Page1, Page2, Page3, Page4, Page5, Page6, Page7, Page8,
Page9, Page10, Page11, Page12, Page13

Function Item_Open()
'Item.GetInspector.SetCurrentFormPage "Message"
Set objPage = Item.GetInspector.ModifiedFormPages("Message")
Set MultiPage1 = objPage.Controls("MultiPage1")
Set Page1 = MultiPage1.Pages("Page1")
Set Page2 = MultiPage1.Pages("Page2")
Set Page3 = MultiPage1.Pages("Page3")
Set Page4 = MultiPage1.Pages("Page4")
Set Page5 = MultiPage1.Pages("Page5")
Set Page6 = MultiPage1.Pages("Page6")
Set Page7 = MultiPage1.Pages("Page7")
Set Page8 = MultiPage1.Pages("Page8")
Set Page9 = MultiPage1.Pages("Page9")
Set Page10 = MultiPage1.Pages("Page10")
Set Page11 = MultiPage1.Pages("Page11")
Set Page12 = MultiPage1.Pages("Page12")
Set Page13 = MultiPage1.Pages("Page13")

Page13.Visible = false
Page12.Visible = false
Page11.Visible = false
Page10.Visible = false
Page9.Visible = false
Page8.Visible = false
Page7.Visible = false
Page6.Visible = false
Page5.Visible = false
Page4.Visible = false
Page3.Visible = false
Page2.Visible = false

end function

Sub cbChooseLAN_Click()
If Page2.Visible then
Page2.Visible = false
else
Page2.Visible = true
Item.Recipients.Add "RTLANADMIN"
end if
end Sub

Sub cbChooseSAPNewUser_Click()
If Page3.Visible then
Page3.Visible = false
else
Page3.Visible = true
Item.Recipients.Add "SAPSecurity"
end if
end Sub

Sub cbChooseSAPUpdateUser_Click()
If Page4.Visible then
Page4.Visible = false
else
Page4.Visible = true
Item.Recipients.Add "SAPSecurity"
end if
end Sub

Sub cbChooseAS400RSouth_Click()
If Page5.Visible then
Page5.Visible = false
else
Page5.Visible = true
Item.Recipients.Add "AS/400 Security"
end if
end sub

Sub cbChooseAS400RCP_Click()
If Page6.Visible then
Page6.Visible = false
else
Page6.Visible = true
Item.Recipients.Add "AS/400 Security"
end if
end sub

Sub cbChooseBlueZoneMF_Click()
If Page7.Visible then
Page7.Visible = false
else
Page7.Visible = true
Item.Recipients.Add "IT Security"
end if
end Sub

Sub cbChooseBlueZonePOBR_Click()
If Page8.Visible then
Page8.Visible = false
else
Page8.Visible = true
Item.Recipients.Add "IT Security"
end if
end Sub

Sub cbChooseVPN_Click()
If Page9.Visible then
Page9.Visible = false
else
Page9.Visible = true
Item.Recipients.Add "RTLANADMIN"
end if
end Sub

Sub cbChooseCognosInfoView_Click()
If Page10.Visible then
Page10.Visible = false
else
Page10.Visible = true
Item.Recipients.Add "IT Security"
end if
end sub

Sub cbChooseDashboard_Click()
If Page11.Visible then
Page11.Visible = false
else
Page11.Visible = true
Item.Recipients.Add "Help Desk"
end if
end sub

Sub cbChooseRoadNet_Click()
If Page12.Visible then
Page12.Visible = false
else
Page12.Visible = true
Item.Recipients.Add "RTLANADMIN"
end if
end sub

Sub cbChooseZilliant_Click()
If Page13.Visible then
Page13.Visible = false
else
Page13.Visible = true
Item.Recipients.Add "SAPSecurity"
end if
end sub

--