PDA

Click to See Complete Forum and Search --> : Data1.Refresh - It Don't Work


Harrild
Jul 15th, 2000, 04:39 AM
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?????
____________

MUHAHAHAHAHA
____________

Jimmer
Jul 15th, 2000, 09:29 AM
Give this a try:

Dim bandsql As String
bandsql = "Select * from [cd_serial_numbers] where [band_name] = '" & txtband.Text & "'"
Let Data1.RecordSource = bandsql
data1.refresh

Hope this helps.

Harrild
Jul 15th, 2000, 06:46 PM
Nope that didn't work it still says the table is missing when it gets to data1.refresh.