ben2203
Nov 20 2009, 04:03 AM
Sorry to be a pest,
I've asked this question before about three years ago but I've completely forgotten how to do it.
I have two combo boxes, lets say cbobox1 and cbobox2, I want cbobox2 to be disabled until cbobox1 has been completed with a value, I have a vague recollection of something like this but I'm not sure it's completely correct, the most obvious thing to do would be for me to try it but I wanted to ask the experts first, if that is ok?
if cbobox1.value = null
then
me.cbobox2.enabled = false
else
me.cbobox2.enabled = true
end sub
Thanks for your time
Larry Larsen
Nov 20 2009, 04:15 AM
Hi
Look to use the On Current event of the form..
Try this:
CODE
If IsNull(Me.ComboName) Then
Me.cbobox2.enabled = False
Else
Me.cbobox2.enabled = True
End If
ben2203
Dec 4 2009, 10:25 AM
Hi Larry,
Not sure, if you will still be following this thread but if you are or anybody else for that matter,
I'm not quite sure which event I will use for another instance where I will use a combos value to display a message to a user.
Basically a variation of the above:
Private Sub Form_Current()
If IsNull(Me.cboSelectSender) Then
Me.cbooutstanding.Visible = True
Else
Me.cbooutstanding.Visible = False
End If
End Sub
so a label (though I've labelled it cbooutstanding) will be displayed if there isn't any data inside the cboselectsender list