Show fields on combo box selection

TimjHebert

Registered User.
Local time
Today, 00:06
Joined
Dec 12, 2004
Messages
40
Can i show and hide fields on a selection in a combo box. I have a combo box with four selections, iDirect,Microwave,DRT,Globalstar. All these selections have text boxes for serial number of the equipment. when a user selects Microwave, i need to show two fields for microwave and not just one. those fields would be named serial1 and serial2. can this be done?

Thanks,
Tim
 
In the after_update event property for the combo box, put something like this:

If me!combobox = "Microwave" then
Me.TextBox1.Visible = true
Me.TextBox2.Visible = true
Me.TextBox3.Visible = false
etc..

elseif me!combobox = "iDirect" then

Me.TextBox3.Visible = true
Me.TextBox1.Visible = false
Me.TextBox2.Visible = false
ETC..

End if

Have all of the textboxes that you wish to hide/unhide their default hidden value set to no. This way from the start nothing shows up. This will make different ones appear and dissappear.

Hope this helps.
 

Users who are viewing this thread

Back
Top Bottom