Excel Param query

I have a query that I was given to work with see SQL below. In it has "Between Param("InvTotalsTransStartDate") And Param("InvTotalsTransEndDate")"
 

QUERY SQL

INSERT INTO tblRepInvoiceTotalsMonthly ( CompanyName, Mth, TotalCommission, CustomerId )
SELECT tblCustomer.CompanyName, DateSerial(Year([TransactionDate]),Month([TransactionDate]),1) AS Mth, Sum(qryDealsBoth.CommissionAmount) AS TotalCommission, qryDealsBoth.CustomerId
FROM tblCustomer INNER JOIN qryDealsBoth ON tblCustomer.CustomerId = qryDealsBoth.CustomerId
WHERE (((tblCustomer.ClearingHouse)=0) AND ((qryDealsBoth.TransactionDate) Between Param("InvTotalsTransStartDate") And Param("InvTotalsTransEndDate")) AND ((qryDealsBoth.Void)=0) AND ((tblCustomer.BillingType)="Front End") AND ((qryDealsBoth.PFLCompanyUsed)=IIf(Param("InvoicingTotalsPFLCompany")="<<All>>",[PFLCompanyUsed],Param("InvoicingTotalsPFLCompany"))))
GROUP BY tblCustomer.CompanyName, DateSerial(Year([TransactionDate]),Month([TransactionDate]),1), qryDealsBoth.CustomerId;


When I try and load these parameters I get an error Item not found 3265. See code below.
    Set myAppqd = mydb.QueryDefs("qryRepCommissionByBrokerInvFE")
    myAppqd("InvTotalsTransStartDate") = Me.TransactionStartDate
    myAppqd("InvTotalsTransEndDate") = Me.TransactionEndDate
    myAppqd.Execute

Does anyone know what I am missing here?
LVL 1
IdaracAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

aikimarkCommented:
I don't see your code setting the Param("InvoicingTotalsPFLCompany") value.
0
IdaracAuthor Commented:
Param("InvTotalsTransEndDate") hidden the code above. Anyway I figured it out Thanx
0
aikimarkCommented:
What was the cause of the error?  Please post that and then accept your comment as the solution to the problem.
0
IdaracAuthor Commented:
Silly but param was actually a function being called from a module.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
IdaracAuthor Commented:
I found the answer myself
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.