mattstrachan
Registered User.
- Local time
- Today, 12:39
- Joined
- Feb 22, 2013
- Messages
- 31
Hello all,
I have a form that has comboboxes with an "Other" option. I want to make a textbox that appears when "Other" is selected and then the user can input information. I have five combo boxes that I would like to do this on.
I have put this code in the Form_Current and cbo_Change event procedures:
Private Sub cboShape_Change()
If Forms!Product!cboShape = "Other" Then
Forms!Product!txtShapeAdditional.Visible = True
Else
Forms!Product!txtShapeAdditional = " "
Forms!Product!txtShapeAdditional.Visible = False
End If
End Sub
This works great and I have used this code with four of my combo boxes. Now I am on to the fifth combo box and the code will not work at all! Here is the exact code that does not work.
Private Sub cboSpecies_Change()
If Forms!Product!cboSpecies = "Multiple Species" Then
Forms!Product!txtSpeciesAdditional.Visible = True
Else
Forms!Product!txtSpeciesAdditional = " "
Forms!Product!txtSpeciesAdditional.Visible = False
End If
End Sub
Any help determining why this suddenly does not work?
Could I have a property set incorrectly? This does not seem possible because I copy/pasted the txtSpeciesAdditional from the txtShapeAdditional but perhaps.
I have a form that has comboboxes with an "Other" option. I want to make a textbox that appears when "Other" is selected and then the user can input information. I have five combo boxes that I would like to do this on.
I have put this code in the Form_Current and cbo_Change event procedures:
Private Sub cboShape_Change()
If Forms!Product!cboShape = "Other" Then
Forms!Product!txtShapeAdditional.Visible = True
Else
Forms!Product!txtShapeAdditional = " "
Forms!Product!txtShapeAdditional.Visible = False
End If
End Sub
This works great and I have used this code with four of my combo boxes. Now I am on to the fifth combo box and the code will not work at all! Here is the exact code that does not work.
Private Sub cboSpecies_Change()
If Forms!Product!cboSpecies = "Multiple Species" Then
Forms!Product!txtSpeciesAdditional.Visible = True
Else
Forms!Product!txtSpeciesAdditional = " "
Forms!Product!txtSpeciesAdditional.Visible = False
End If
End Sub
Any help determining why this suddenly does not work?
Could I have a property set incorrectly? This does not seem possible because I copy/pasted the txtSpeciesAdditional from the txtShapeAdditional but perhaps.