Sub LoadLista
ListaCose.Clear
listacose.BringToFront
If main.ListaOpzioni=2 Then
Cursor1=Sql1.ExecQuery2("SELECT Codice,Cosa,Dove,Quando,Categoria,Note FROM articoli where cosa like ? ORDER BY cosa", Array As String(main.Cercacosa))
Else
If main.ListaOpzioni=3 Then
Cursor1=Sql1.ExecQuery2("SELECT Codice,Cosa,Dove,Quando,Categoria,Note FROM articoli where Dove like ? ORDER BY cosa", Array As String(main.CercaDove))
Else
If main.ListaOpzioni=4 Then
Cursor1=Sql1.ExecQuery2("SELECT Codice,Cosa,Dove,Quando,Categoria,Note FROM articoli where categoria like ? ORDER BY cosa", Array As String(main.Cercacategorie))
Else
Cursor1 = SQL1.ExecQuery("SELECT Codice,Cosa,Dove,Quando,Categoria,Note FROM Articoli ORDER BY Cosa")
End If
End If
End If
For i = 0 To Cursor1.RowCount - 1
Cursor1.Position = i
valore=Cursor1.GetString("Codice")
valore2=Cursor1.getstring("Cosa")
Valore3=Cursor1.getstring("Dove")
If valore2.Length >=30 Then
Valore2=valore2.SubString2(0,30)&"..."
End If
If valore3.Length >=39 Then
Valore3=valore3.SubString2(0,39)&"..."
End If
Msgbox(Valore2,"Normale")
Valore2=Valore2.Replace(Chr(13), " ")
Msgbox(Valore2,"Con Chr 13")
Valore2=Valore2.Replace(Chr(10), " ")
Msgbox(Valore2,"Con Chr 10")'**************** CORRECT LINE ****************
ListaCose.AddTwoLines2(Valore2,Valore3,Valore)
Next
Cursor1.Close
End Sub