Help with passing ASP variables to saved queries

T

tranceport185

This Saved Access Query is called InnerJoinCategoryReport

SELECT InvLine.Cat, Sum(InvLine.Price) AS Total
FROM Payments INNER JOIN ((InvLine INNER JOIN Invoice ON InvLine.IId =
Invoice.IId) INNER JOIN PaySplit ON Invoice.IId = PaySplit.IId) ON
Payments.PAYId = PaySplit.PayId
WHERE (((Invoice.Total)=[Invoice].[Paid]) AND ((Payments.PayDate)
Between #"& dtStartDate &"# And #"& dtEndDate &"#))
GROUP BY InvLine.Cat
ORDER BY InvLine.Cat;

And is called by this query in ASP

SELECT POSCat.Description, InnerJoinCategoryReport.Total
FROM POSCat LEFT JOIN InnerJoinCategoryReport ON
InnerJoinCategoryReport.Cat=POSCat.Description;

I had to do it this way because Access seemed to get confused when I
tried to do the Left Join with the Inner Joins in the 1st query and
wouldn't run. My question is from ASP how can I have the variables
dtStartDate and dtEndDate setup so that it is read from ASP? I have
seen a couple examples but they were not this complex. BTW tested hard
coded dates work fine, thanks in advance.

-Sam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top