[COLOR="Green"]'This code will hide or show the combo based on the selection that has been made in the combo[/COLOR]
If Me.ComboName.Value = X Then [COLOR="Green"]'Where X = the value of the field[/COLOR]
Me.TextBoxName.Visible = True
Else
Me.TextBoxNmae.Visible = False
End IF
[COLOR="Green"]'This code will hide the named text box until a selection has been made in your Combo, assuming that it does not have a default value[/COLOR]
If Isnull(Me.ComboName) then
Me.TextBoxName.Visible = False
Else
Me.TextBoxNmae.Visible = True
End IF
missinglinq,
I did put it in there as well, but didn't paste that in on my reply. I was curious though, has there been an earlier or newer version that didn't require the quotes? I am using Access 2003. Thank you so much. Now I can move on to making selections grey out or not show in a Combo box drop down when they are not appropriate or conflict with another selection. Any thoughts on that?
stephen
missinglinq,
..........Now I can move on to making selections grey out or not show in a Combo box drop down when they are not appropriate or conflict with another selection. Any thoughts on that?
stephen
me.ComboName.Visible = False
me.ComboName.Enabled=False
Now I can move on to making selections grey out or not show in a Combo box drop down when they are not appropriate or conflict with another selection.
If me.cmbNumberOne = SomeValue Then
me.cmbNumberTwo.Enabled = False
EndIf
You need cascading combo boxes mate. Search for em, lots of threads on this, and even more samples.I don't want to hide the whole combo box, I want to make it so that if in combo box Body_Type="ED", then when I go to combo box Body_Size and click on the down arrow to veiw the possible choices, only the choices that are valid for the ED will be available to be chosen. The other choices that aren't valid would be Grayed out or not there at all.
Its either make the invalid choices gray out or disappear, or I'll have to make special field just for ED Body Sizes. I would rather keep all body size selections in one field.
Stephen