Hi James,i don't know how to thank yuo.without your help I would not have ever made.I write the correct code for all who need it.thanks, thanks, thanksBarbara
If Not cboStrada.SelectedText = "" Then ' Or try cboStrada.SelectedValue strQuery = "Nome_Strada = '" & cboStrada.Text & "'" ElseIf Not cboCodice.SelectedText = "" Then strQuery = "Codice = '" & cboCodice.Text & "'" ElseIf Not cboProvincia.SelectedText = "" Then strQuery = "Provincia = '" & cboProvincia.Text & "'" Else MsgBox ("No values set in any of the ComboBoxes!") End If
hello,I better explain what it will do.Attached are two photos that you show what can I do now.I would however be able to do a search that lets you select any value ofany combobox and not just one.I would add these other queries:strQuery = "Nome_Strada= '" & cboStrada.Text & "' and Codice = '" & cboCodice.Text & "'and Provincia = '" & cboProvincia.Text & "'" orstrQuery = "Nome_Strada= '" & cboStrada.Text & "' or Codice = '" & cboCodice.Text & "'and Provincia = '" & cboProvincia.Text & "'"I tried with if then else cycles but the result is always and only, the first choice in the cycle if.Sorry if I was not too clear.Thanks.
If Not cboStrada.Text = "" Then strQuery = "Nome_Strada = '" & cboStrada.Text & "'" ElseIf Not cboCodice.Text = "" Then strQuery = "Codice = '" & cboCodice.Text & "'" ElseIf Not cboProvincia.Text = "" Then strQuery = "Provincia = '" & cboProvincia.Text & "'" Else msgBox("No values set in any of the ComboBoxes!") End If
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.