Hi,
I created a form with number 3 combobox.
when you press the search button, I do a search on the basis of
combobox choice, only 1 or 2 or all three.
This is the code I wrote and it works perfectly but only for a
case (Only one combobox is choice)
How can I add other combinations?
Can someone help me?
Thank you.
Private Sub cmdSearch_Click()
    Dim pMxDoc As IMxDocument
    Set pMxDoc = ThisDocument
    Dim pMaps As IMaps
    Set pMaps = pMxDoc.Maps
    Dim pCatastoStradeMappa As IMap
    Set pCatastoStradeMappa = pMaps.Item(0)
    Dim pInterventiLayerDef As IFeatureLayerDefinition
    Set pInterventiLayerDef = pCatastoStradeMappa.Layer(0)
    If cboStrada = " " And cboCodice = " " And cboProvincia = " " And cboSoggetto = " " Then
        MsgBox "Scegli almeno un parametro di ricerca"
    End If
    Dim strQuery As String
    strQuery = "Nome_Strada= '" & cboStrada.Text & "' or Codice = '" & cboCodice.Text & "'or Provincia = '" & cboProvincia.Text & "'"
    Dim pCatastoStradeActiveView As IActiveView
    Set pCatastoStradeActiveView = pCatastoStradeMappa
    
    Dim pCatastoStradeLayer As IFeatureSelection
    Set pCatastoStradeLayer = pCatastoStradeMappa.Layer(0)
    
    Dim pFilter As IQueryFilter
    Set pFilter = New QueryFilter
    pFilter.WhereClause = strQuery
    pCatastoStradeLayer.SelectFeatures pFilter, esriSelectionResultNew, False
.......