Good Day,
I am using the intermediate window to check the accuracy of a string which I copied from a SQL query window. It returns an error message which I am having difficulty detecting. My code is as follows:
HTML Code:
Public Sub Accounts()
Dim curDatabase As Database
Dim rst As Recordset
Dim strSql As String
strSql = "SELECT Sum([Order Details].Quantity) AS SumOfQuantity," _
& "[Order Details]. AccountFROM [Order Details]GROUP BY [Order Details].Account," _
& "[Order Details].[Order ID]HAVING ((([Order Details].[Order ID])=201));"
Debug.Print strSql
Set curDatabase = CurrentDb
Set rst = curDatabase.OpenRecordset(strSql)
Set rst = Nothing
Set curDatabase = Nothing
End Sub
can anyone assist in the detection of my error.