I
Ian Turk
I have spent ages trying to find the problem with this simple coding - and I
just cant see it.
I have Access 2002
The below is coded to a command button, but I keep getting a message "A
RunSQL action requires an argument consisting of an SQL statement"
I have reduced this right down to the simplest SQL statement - but still
cant work out the problem - put the statement into the query design window
and it runs fine.
Any help before all my hair goes would be appreciated!!
Many thanks
Ian
Private Sub Co_Searchtext_Click()
Dim Querysql As String
On Error GoTo Err_Co_Searchtext_Click
Querysql = "SELECT T_PersExp.CompanyID, T_PersExp.ContactLast FROM
T_PersExp;"
DoCmd.RunSQL Querysql
Exit_Co_Searchtext_Click:
Exit Sub
Err_Co_Searchtext_Click:
MsgBox Err.Description
Resume Exit_Co_Searchtext_Click
End Sub
just cant see it.
I have Access 2002
The below is coded to a command button, but I keep getting a message "A
RunSQL action requires an argument consisting of an SQL statement"
I have reduced this right down to the simplest SQL statement - but still
cant work out the problem - put the statement into the query design window
and it runs fine.
Any help before all my hair goes would be appreciated!!
Many thanks
Ian
Private Sub Co_Searchtext_Click()
Dim Querysql As String
On Error GoTo Err_Co_Searchtext_Click
Querysql = "SELECT T_PersExp.CompanyID, T_PersExp.ContactLast FROM
T_PersExp;"
DoCmd.RunSQL Querysql
Exit_Co_Searchtext_Click:
Exit Sub
Err_Co_Searchtext_Click:
MsgBox Err.Description
Resume Exit_Co_Searchtext_Click
End Sub