I want to check the value in a dropdown list. The list is preconfigured to hold a yes or a no.
At the moment, I am using a check box, that looks like this:
If chkboxOne.Value = vbChecked And (LenB(txtDetailsRefNo.Text) = 0) Then
If vblnShowErrors Then Err.Raise 10000, VALIDATION, "A Default Reference Number must be entered."
blnDataFail = True
End If
Can I simply change chkboxOne to “cboboxOne” by swapping the checkbox for a combobox on the form, and replacing “vbChecked” with True? I’m not sure how similar their functionality is syntax wise.
Thanks
To get the item in a combobox you can examine the
listindexto see whats selected (there is novalueproperty)You can also examine the selected text:
You can also test against custom integers using
ItemData