here is my code:
Dim sSQL As String
sSQL = "SELECT Fills_Data.SrcAccount, Fills_Data.SrcUserId, Fills_Data.Account, Sum(Fills_Data.LastQty) AS SumOfLastQty INTO ResultsTable FROM Fills_Data GROUP BY Fills_Data.SrcAccount, Fills_Data.SrcUserId, Fills_Data.Account, Fills_Data.TradeDate HAVING (((Fills_Data.TradeDate) > '" & sPreviousDate & "'));"
DoCmd.RunSQL sSQL
The data contained in sPreviousDate is '20070310'. The problem is that this creates but does not populate the table. The fills_data table is an sql server table and the access database uses an odbc connection to read it. When I try this code in an access query it works just fine. I am lost for a solution and would appreciate any help given. Thanks.
Dave
Dim sSQL As String
sSQL = "SELECT Fills_Data.SrcAccount, Fills_Data.SrcUserId, Fills_Data.Account, Sum(Fills_Data.LastQty) AS SumOfLastQty INTO ResultsTable FROM Fills_Data GROUP BY Fills_Data.SrcAccount, Fills_Data.SrcUserId, Fills_Data.Account, Fills_Data.TradeDate HAVING (((Fills_Data.TradeDate) > '" & sPreviousDate & "'));"
DoCmd.RunSQL sSQL
The data contained in sPreviousDate is '20070310'. The problem is that this creates but does not populate the table. The fills_data table is an sql server table and the access database uses an odbc connection to read it. When I try this code in an access query it works just fine. I am lost for a solution and would appreciate any help given. Thanks.
Dave