I have the following script to run sql via a commandbutton but I keep getting a runtime error which says - A runsql action requires an argument consisting of an sql statement
Code:
Sub test1()
Dim strsql As String
strsql = "SELECT ContactT.*, CustomerT.FirstName, CustomerT.LastName, Trim([FirstName] & "" "" & [LastName]) AS FullName, CustomerT.CompanyName, CustomerT.Phone " & _
"FROM CustomerT INNER JOIN ContactT ON CustomerT.CustomerID = ContactT.CustomerID " & _
"WHERE (((CustomerT.FirstName)=""joe""));"
DoCmd.RunSQL strsql
End Sub