>>Rock God<<
2010-04-22 13:28:40 UTC
Hi,
When I run a simple search on a database I get the following error:
Syntax error (missing operator) in query expression 'Lesson= B Monday 12:00pm'.
(B Monday 12:00pm is my search data)
I then get the following error:
Method 'Refresh' of object 'IAdodc' failed
The code is as follows:
Private Sub search_cmd_Click()
If (TxtSearch = "") Then MsgBox "You need to select a lesson"
Adodc1.RecordSource = "SELECT * FROM booking WHERE Lesson= " & TxtSearch.Text & ""
Adodc1.Refresh
End Sub
On debug it highlights Adodc1.Refresh
Thanks!