Use listbox for open recordset

  • Thread starter Thread starter Tiziana Venturini
  • Start date Start date
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
 
In what way does it not work? Do you get error messages? What is the
expected behavior versus the observed behavior?

-Matt
 
Back
Top