I have a program that was working at one point. I made no changes at my end. I received a new Access database to work on and now I get the error
Run-time error '-2147217904 (80040e10)': No value given for one or more required parameters.
The code running is the first option for the USA corp and the error is on the last line see comment in code
Code:
    strStart = Format(CStr(dtStartDate), "MM/dd/yyyy")
    strEnd = Format(CStr(dtEndDate), "MM/dd/yyyy")
    
    If frmMain.chkCountry.Value = vbChecked Then  'USA corp
        AccCMD.CommandText = "SELECT Accounts.ID, Accounts.CompanyDBAName, " _
            & "Orders.OrderID, Orders.OrderDate, Orders.Amount, " _
            & "Orders.Shipping, Orders.InvoiceByCorporation, " _
            & "Transactions.TransactionID, Transactions.ProductID, " _
            & "Transactions.Sold, Transactions.UnitPrice, Transactions.Price, " _
            & "Transactions.GST, Transactions.PST, Orders.Terms, Orders.Currency, " _
            & "Orders.ShipGST, Orders.ShipPST " _
            & "FROM Accounts INNER JOIN (Orders " _
            & "INNER JOIN Transactions ON Orders.OrderID = Transactions.OrderID " _
            & ") ON Accounts.ID = Orders.BillToID " _
            & "WHERE Orders.InvoiceByCorporation = '" & strCountry & "' " _
            & "AND (Orders.OrderDate >= #" & strStart & "# " _
            & "AND Orders.OrderDate <= #" & strEnd & "#) " _
            & "ORDER BY Orders.OrderID, Transactions.TransactionID"
    Else    'Can Corp
        AccCMD.CommandText = "SELECT Accounts.ID, Accounts.CompanyDBAName, " _
            & "Orders.OrderID, Orders.OrderDate, Orders.Amount, " _
            & "Orders.Shipping, Orders.InvoiceByCorporation, " _
            & "Transactions.TransactionID, Transactions.ProductID, " _
            & "Transactions.Sold, Transactions.UnitPrice, Transactions.Price, " _
            & "Transactions.GST, Transactions.PST, Orders.Terms, Orders.Currency, " _
            & "Orders.ShipGST, Orders.ShipPST " _
            & "FROM Accounts INNER JOIN (Orders " _
            & "INNER JOIN Transactions ON Orders.OrderID = Transactions.OrderID " _
            & ") ON Accounts.ID = Orders.BillToID " _
            & "WHERE Orders.InvoiceByCorporation = '" & strCountry & "' " _
            & "AND (Orders.OrderDate >= #" & strStart & "# " _
            & "AND Orders.OrderDate <= #" & strEnd & "#) " _
            & "AND Orders.Currency = '" & strCountry & "' " _
            & "ORDER BY Orders.OrderID, Transactions.TransactionID"
    End If
            
    Debug.Print AccCMD.CommandText

    
    AccRS.Open AccCMD         'ERROR ON THIS LINE
I am not sure why it wouldn't be working unless there is something new in the data for some reason. The Debug.Print looks ok to me
SELECT Accounts.ID, Accounts.CompanyDBAName, Orders.OrderID, Orders.OrderDate, Orders.Amount, Orders.Shipping, Orders.InvoiceByCorporation, Transactions.TransactionID, Transactions.ProductID, Transactions.Sold, Transactions.UnitPrice, Transactions.Price, Transactions.GST, Transactions.PST, Orders.Terms, Orders.Currency, Orders.ShipGST, Orders.ShipPST FROM Accounts INNER JOIN (Orders INNER JOIN Transactions ON Orders.OrderID = Transactions.OrderID ) ON Accounts.ID = Orders.BillToID WHERE Orders.InvoiceByCorporation = 'USA' AND (Orders.OrderDate >= #05/19/2008# AND Orders.OrderDate <= #06/02/2008#) ORDER BY Orders.OrderID, Transactions.TransactionID
so I am pretty sure all parameters are working correctly and properly filled.
Yes there are records for the date range (about 295). I do have to copy the data from one database (password protected at the database level not user-level security, to another unsecured file, but have copied and confirmed I copied all records from each of Accounts, Orders and Transactions properly.

Does anyone know of any other reasons this message may pop up? I believe the parameters are filled properly and formatted properly for Access. Any help is appreciated TIA rasinc