Thread: Forms
View Single Post
  #9  
Old April 20th 06, 01:28 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Forms

If Local is a text property, you need to use string values for your Case statements -- "1" not 1.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Ceige" wrote in message ...
ok im back AGAIN hehe

Right i am going wrong somewhere

I have Four pages in my form labelled "Main" - "1" - "2" - "3"
On "Main" is A Combobox with a field called "Local" and then Values of 1,2,3
In the other pages is just text boxes for now.

In my script is the following thanks to your help so far

Sub Item_CustomPropertyChnage(ByVal Name)
If Name = "Local" Then
Select Case Item.UserProperties("Local").Value
Case 1
Item.GetInspector.ShowFormPage("1")
Item.GetInspector.HideFormPage("2")
Item.GetInspector.HideFormPage("3")
Case 2
Item.GetInspector.HideFormPage("1")
Item.GetInspector.ShowFormPage("2")
Item.GetInspector.HideFormPage("3")
Case 3
Item.GetInspector.HideFormPage("1")
Item.GetInspector.HideFormPage("2")
Item.GetInspector.ShowFormPage("3")
End Select
End If
End Sub

Now is there something totally wrong or should this work.

When i run the form i can see all pages and edit each one


Ads