Thread: Forms
View Single Post
  #10  
Old April 20th 06, 03:55 PM posted to microsoft.public.outlook.program_vba
Ceige
external usenet poster
 
Posts: 8
Default Forms

Ok getting no where here hehe

Right tried adding quotes around the numbers after case and still no effect,
also tried the enabled=true etc eric suggested and nothing.

Here is a few more details.
The Combo box has a name of "ComboBox1"
Under Value it says in the following order:
Choose Field : Local
Type : Text
Format :Text (Grayed out)
List Type : DropDown
Property to use : Value
Possible Values : 1;2;3

There is no initial value and it is not required

If i design a form and then goto "form" and "run this form" it does run
script doesnt it???

Again i cant thank you enough for your time in this matter

"Sue Mosher [MVP-Outlook]" wrote:

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