Corrections:
Code:
Set Rst = Dbs.OpenRecordset(Sql_Search)
Lst_Search.RowSourceType = "Value List"
If (Rst.RecordCount <> 0) Then
Do While Not Rst.EOF
' show Fields in 1 row
RowStr = RowStr & Rst.Fields(0).Value & ";" & Rst.Fields(1).Value & ";" & Rst.Fields(2).Value & ";" & Rst.Fields(3).Value & ";"
'Lst_Search.AddItem RowStr
Rst.MoveNext
Loop
rst.close
End If
'Next statement removes the extra semicolon at the end of the string
RowStr = Left(RowStr,Len(RowStr)-1)
Me.Lst_Search.RowSource = RowStr
Me.Lst_Search.ReQuery
End Sub
OR
Code:
Set Rst = Dbs.OpenRecordset(Sql_Search)
Lst_Search.RowSourceType = "Value List"
If (Rst.RecordCount <> 0) Then
Do While Not Rst.EOF
' show Fields in 1 row
RowStr = Rst.Fields(0).Value & ";" & Rst.Fields(1).Value & ";" & Rst.Fields(2).Value & ";" & Rst.Fields(3).Value
Lst_Search.AddItem RowStr
Rst.MoveNext
Loop
rst.close
End If
Me.Lst_Search.ReQuery
End Sub