-
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?????
__________________
MUHAHAHAHA
__________________
-
Have youtried enclossing the table name in Square Brackets?
eg: SELECT * FROM [MY Table]WHERE ID = 'dl';
This can sometimes help.
If that does not work try putting a sample of the SQL statement into the recordsource property at design time and then running the program.
-
It's good to put square brackets around the field name
and the table name
"SELECT * FROM [table_name] WHERE [field_name] = 'value'"
-
What is the Data1.RecordsetType set to?