Hello
I have a form that loads user data from a table "A01_Archivio_DatiSoggetto"
There is a field "TipoPersona" and it can have 2 values "Persona Fisica, Persona Giuridica" I am trying to do a select to load only the "Peronsa Fisica" type users.
AdoDatiSoggetto is a Adoc with a Connection String "DSN=CIS"
I don't get a error but this code loads all the user with Persona Fisica and Persona Giuridica
Ehat should i do??
VB Code:
Private Sub cmdNext_Click() Dim rs As Recordset Dim NomeViaSearch As Integer Set cn = New Connection cn.Open "CIS" Set rs = New Recordset rs.Open "Select TipoPersona From [A01_Archivio_DatiSoggetto] Where TipoPersona = 'Persona Fisica'", cn, adOpenStatic, adLockOptimistic Do Until rs.EOF AdoDatiSoggetto.Recordset.MoveNext If AdoDatiSoggetto.Recordset.EOF Then AdoDatiSoggetto.Recordset.MovePrevious End If Loop rs.Close End Sub
Thanks




Reply With Quote