codice:
strsql = "INSERT INTO Clienti (Cognome, Nome, Azienda, " & _
" Codice_Fiscale, Partita_Iva, Indirizzo, " & _
" Civico, Cap, Citta, Provincia, Indirizzo_Spedizione, " & _
" Tipo_Persona, Parole_Chiave) VALUES " & _
"( '" & IIf(Replace(Me.txtCognome, "'", "''") = "", "-", Replace(Me.txtCognome, "'", "''")) & _
"', '" & IIf(Replace(Me.txtNome, "'", "''") = "", "-", Replace(Me.txtNome, "'", "''")) & _
"', '" & Replace(Me.txtAzienda, "'", "''") & _
"', '" & UCase(Replace(Me.txtCodiceFiscale, "'", "''")) & _
"', '" & IIf(Me.txtPartitaIva = "", "-", Me.txtPartitaIva) & _
"', '" & Replace(Me.txtIndirizzo, "'", "''") & _
"', " & CInt(Me.txtNumCivico) & _
", " & CInt(Me.txtCap) & _
", '" & Replace(Me.txtCitta, "'", "''") & _
"','" & Replace(Me.txtProvincia, "'", "''") & _
"','" & Replace(Me.txtIndSpedizione, "'", "''") & _
"','" & IIf(Me.optFisica And Not Me.optGiuridica, "F", "G") & _
"','" & LCase(Trim(Replace(Me.txtParoleChiave, "'", "''"))) & "'"
Db.Execute (strsql)