Hi All,
I've added an 'All' item to my combobox(below) and it does display as
the first item
If Me.cboLOB.Column(0) = "auto" Then
strSQL = "SELECT DISTINCT tblAUTO_MASTER.Section" & _
" FROM tblAUTO_MASTER" & _
" Union" & _
" SELECT '(ALL)' As Bogus FROM tblAUTO_MASTER" & _
" ORDER BY 1"
but when I select "(ALL)" in the displayed combobox and click the 'go'
button which runs this code(below) the "(ALL)" does not get detected.
WHY? What I'm I missing??
If ctl.ItemsSelected.Count = 0 Then
MsgBox "You did not select any Phases, please try again.",
vbExclamation, "Ooooooops!"
Exit Sub
ElseIf ctl.ItemsSelected.Count = 1 Then
If ctl.ItemData(varItem) = "(ALL)" Then
strIN = " WHERE tblAUTO_MASTER.Section Like '*'"
Else
strIN = " WHERE tblAUTO_MASTER.Section='"
For Each varItem In ctl.ItemsSelected
strIN = strIN & ctl.ItemData(varItem) & "'"
Next varItem
End If
thanks
bobh.