here is the code:
Dim sSQL As String
sSQL = "SELECT SrcAccount, SrcUserId, Account, Sum(LastQty) AS SumOfLastQty FROM Fills_Data GROUP BY SrcAccount, SrcUserId, Account;"
DoCmd.RunSQL sSQL
When I click on the button to activite this code I get this error message:
Run-time error '2342': A RunSQL action requires an argument consisting of an SQL statement.
The Fills_Data table is an ODBC table residing in and SQL Server 2005 database. When I run the same code in an Access query the code works just fine. Can anyone help me on this? Thanks for all help in advance.
Dave
Dim sSQL As String
sSQL = "SELECT SrcAccount, SrcUserId, Account, Sum(LastQty) AS SumOfLastQty FROM Fills_Data GROUP BY SrcAccount, SrcUserId, Account;"
DoCmd.RunSQL sSQL
When I click on the button to activite this code I get this error message:
Run-time error '2342': A RunSQL action requires an argument consisting of an SQL statement.
The Fills_Data table is an ODBC table residing in and SQL Server 2005 database. When I run the same code in an Access query the code works just fine. Can anyone help me on this? Thanks for all help in advance.
Dave