Combo Box and hidden text boxes upon choice 
Author Message
 Combo Box and hidden text boxes upon choice

Quote:

> I am using VB4 16 bit and using a combo box in drop down list mode. I want to
> keep some text boxes hidden until a certain choice is picked from the list. I
> am using the following code:

> If Combo1.Text = "Simple" Then
>   Text1.Visible = True
> End If

> I just can't get the text1 to be visible. (I have set the choices in the list
> box and visible property on the text box at design time.

> Thanks in advance

Don,
  Write this code.

  Private Form_Load ()

     Combo1.Additem "Simple"

  End Sub

  Private Sub Combo1_Click()

      If Combo1.List(Combo1.ListIndex) = "Combo1" Then
          Text1.Visible = True
      End If

  End Sub

Any doubt, Email me.

Pedro Neiva

Quote:

> Don



Fri, 15 Jan 1999 03:00:00 GMT  
 Combo Box and hidden text boxes upon choice

I am using VB4 16 bit and using a combo box in drop down list mode. I want to
keep some text boxes hidden until a certain choice is picked from the list. I
am using the following code:

If Combo1.Text = "Simple" Then
  Text1.Visible = True
End If

I just can't get the text1 to be visible. (I have set the choices in the list
box and visible property on the text box at design time.

Thanks in advance

Don



Fri, 15 Jan 1999 03:00:00 GMT  
 Combo Box and hidden text boxes upon choice

As a matter of course I'd use the trim, ucase$ on both sides to make
sure that the test is satisfied.

Have you set a break and examined the contents of Combo1.Text ?

Shelly



Sat, 16 Jan 1999 03:00:00 GMT  
 Combo Box and hidden text boxes upon choice

Quote:

>> If Combo1.Text = "Simple" Then
>>   Text1.Visible = True
>> End If

>  Write this code.
>  Private Form_Load ()
>     Combo1.Additem "Simple"
>  End Sub

>  Private Sub Combo1_Click()
>      If Combo1.List(Combo1.ListIndex) = "Combo1" Then
>          Text1.Visible = True          ******** I believe the above
should be "Simple"
>      End If>                                 ******** otherwise we are

looking for the text "Combo1"
Quote:
>  End Sub                                  ******** within the list

Combo1.
                                                   ******** Just something
I noticed... I think.

Bob G.



Fri, 29 Jan 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Combo Box and hidden text boxes upon choice

2. Combo box selection narrows next combo box choices

3. Highlighting data in the text portion of a combo box and overwriting it upon data entry

4. Limiting Access to Text Boxes, List Boxes and Combo Boxes

5. Hiding combo box border and drop-down box

6. Cetting A Report To Select Records Based Upon A Value Selected In A Combo Box

7. Multiple choices from combo box

8. Unable to populate text box from combo box

9. Putting a value from a combo box into a text box on a form

10. Filling combo box text box area from data

11. Created Form in Word - Irregular movement of combo boxes, text boxes on scrolling

12. Adding to a combo box or text box through the keyboard

 

 
Powered by phpBB® Forum Software