Ecco il codice:

If AdoRs.State = adStateOpen Then
AdoRs.Close
End If
'************************************************* ***********

strQuery = "Select *" _
& " From tAnagrafica" _
& " Where NomeAzienda= '" & Combo1.Text & "' AND ID= '" & TxtID.Text & "' "


' Riempio le text del form
'************************************************* *********

Esegui_Query (strQuery)

Call pulisci


If AdoRs!Località <> "" Then
txtLocalita.Text = AdoRs!Località
End If
If AdoRs!Città <> "" Then
txtProvincia.Text = AdoRs!Città
End If
If AdoRs!CAP <> "" Then
txtCAP.Text = AdoRs!CAP
End If
If AdoRs!Indirizzo <> "" Then
txtIndirizzo.Text = AdoRs!Indirizzo
End If
If AdoRs!Tel <> "" Then
txtTel.Text = AdoRs!Tel
End If
If AdoRs!Fax <> "" Then
txtFax.Text = AdoRs!Fax
End If
If AdoRs!Web <> "" Then
txtWeb.Text = AdoRs!Web
End If
If AdoRs!Email <> "" Then
txtemail.Text = AdoRs!Email
End If

TxtID.Text = AdoRs!ID
If AdoRs!Codice_cliente <> "" Then
txtCodicecliente = AdoRs!Codice_cliente
End If

ID = AdoRs!ID
IDAnagrafica = ID
NomeAziendaAnagrafica = AdoRs!NomeAzienda

'Associo al controllo il campo NomeAzienda utile per la modifica della Ragione Sociale
txtModNomeAzienda.Text = AdoRs!NomeAzienda
'************************************************* ************************************