T
Tiziana Venturini
I need to open recordset with a values of a listbox:
My code:
Dim strCriterio As String
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("Select * from Service where" _
& " Num_Civ= & Me!Liste44.Column(2)")
strCriterio = ""
rs.MoveFirst
While Not rs.EOF
strCriterio = strCriterio & " " & rs!COD_VIA & "/" & rs!NUM_CIV & "/" &
rs!BIS & "/" & rs!INT & "/" & rs!LET & "/" & rs!NUM_SECOND
rs.MoveNext
Wend
...........................
It doesn't work!!
Any idea?
Thank
Tiziana Venturini
My code:
Dim strCriterio As String
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("Select * from Service where" _
& " Num_Civ= & Me!Liste44.Column(2)")
strCriterio = ""
rs.MoveFirst
While Not rs.EOF
strCriterio = strCriterio & " " & rs!COD_VIA & "/" & rs!NUM_CIV & "/" &
rs!BIS & "/" & rs!INT & "/" & rs!LET & "/" & rs!NUM_SECOND
rs.MoveNext
Wend
...........................
It doesn't work!!
Any idea?
Thank
Tiziana Venturini