-
Data1.Refresh
this is the code from my program and i have a problem with it.
Private Sub SearchBand_Click()
Dim bandsql As String
bandsql = "Select * from cd_serial_numbers where band_name = ' " & txtband.Text & " ' "
Let Data1.RecordSource = bandsql
Data1.Refresh
End Sub
After i press the button it fails to refresh the grid. The error message is:
Run Time error '3078'
The Microsoft Jet Database engine cannot find the input table or query "". Make sure it exits and that its name is spelled correctly.
Now it does exist and yes it is spelt correctly so what is the problem?????
-
I'm no expert on this sort of thing, but maybe your extra spaces are confusing it.
bandsql = "Select * from cd_serial_numbers where band_name = ' " & txtband.Text & " ' "
Try changing it to this:
bandsql = "Select * from cd_serial_numbers where band_name = '" & txtband.Text & "'"
Hope that does something.
-Zero the Inestimable
-
nope its not that.
Its the data1.refresh which causes the problems