• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 216
  • Last Modified:

Forms: Choosing a field in dropdown box will show other textfield

Hi,
I'm developing a helpdesk form
This is what i want to do:
I have a dropdown box with 2 values (contractor or own employee). Own employee is the default value. If contractor is chosen a textfield must appear.
I've created the dropdown box (name = EndUserType) and a textfield (name = ExpirationDate). My Outlook Version is 10.0 (Outlook 2002). I don't have a code yet. Hope anybody want/can to help me!
0
Marie-Anne
Asked:
Marie-Anne
  • 2
  • 2
1 Solution
 
jessnjeffCommented:
put the code to make the textfield.visible = true in the Custompropertychange event of the form.

post back if you need further details on proper syntax
0
 
Marie-AnneAuthor Commented:
I'm just a newbie, so if you could give me more information about the custompropertychange event... It would help me a lot!
0
 
jessnjeffCommented:
Okay....
1.  dropdown box field is called EmpStatus
2.  textfield is called MyText


Sub Item_CustomPropertyChange(ByVal Name)

'Get formpages
     Set curpage = Item.getinspector.modifiedformpages("P.2")<----This is the page on which the control is located.  If you used the first one in a message form, it is usually called "Message"
     
'Get controls
         Set myControl = curpage.Controls

     Select Case Name
          Case "EmpStatus"
                myControl("MyText").visible = true
        End Select
End sub

0
 
Marie-AnneAuthor Commented:
Thanks! you helped a lot!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now