Have a custom Outlook 2000 form with 5 pages. Page 1 and Page 5 have associated code to do error checking on information input to the form. If an error is found the page that contains the error is displayed and the cursor is positioned in the input area that is in error. This works fine for Page 1 (oPage). Can't get it to work for Page 5 (csPage). Associated code:
=== to set global variables
set oPage = Item.GetInspector.ModifiedFormPages("General")
set csPage = Item.GetInspector.ModifiedFormPages("Contact Store")
=== when an error is found on "Contact Store" page
MsgBox "You must enter a 3 digit Requestor Area Code!", 48, "Mandatory Field Required"
ContactFail = 1
oPage.TabMain.Pages(0).visible = true
oPage.Tabmain.Value = 0
csPage.txtCSAreaCode.setFocus
I understand that the code above points to Page 1 but if I attempt to change it to point to Page 5 I get errors (ie: if I change Value to something else I get a "cannot set value. invalid" error). Is it the TABMAIN or something else??
=== to set global variables
set oPage = Item.GetInspector.ModifiedFormPages("General")
set csPage = Item.GetInspector.ModifiedFormPages("Contact Store")
=== when an error is found on "Contact Store" page
MsgBox "You must enter a 3 digit Requestor Area Code!", 48, "Mandatory Field Required"
ContactFail = 1
oPage.TabMain.Pages(0).visible = true
oPage.Tabmain.Value = 0
csPage.txtCSAreaCode.setFocus
I understand that the code above points to Page 1 but if I attempt to change it to point to Page 5 I get errors (ie: if I change Value to something else I get a "cannot set value. invalid" error). Is it the TABMAIN or something else??