You only need to declare if you have option explicit at the top.
As I said I think your problem is your spaces.
You have
search = "select * from cd_serial_numbers"
Then
search = search & "where (band_name ='" & txtband.Text & "')"
Try rplacing it with
search = search & " where (band_name ='" & txtband.Text & "')"
should now work
Ian




Reply With Quote