Help with passing ASP variables to saved queries

Tech-Archive recommends: Fix windows errors by optimizing your registry



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

.



Relevant Pages

  • Re: correlated subquery in the crosstab
    ... FROM (tblStudent INNER JOIN (tblClass INNER JOIN ... values from the outer query and I have made an alias for it. ... I have students, courses, exam groups containing exams of courses, ... that the crosstab query in access has much more capablities than ...
    (microsoft.public.access.queries)
  • Re: correlated subquery in the crosstab
    ... I solved my problem using stored queries to act as subqueries. ... FROM (tblStudent INNER JOIN (tblClass INNER JOIN ... values from the outer query and I have made an alias for it. ... that the crosstab query in access has much more capablities than ...
    (microsoft.public.access.queries)
  • Re: correlated subquery in the crosstab
    ... The first query ... TRANSFORM FirstAS FirstOfscore ... FROM tblStudent INNER JOIN (((tblEduYear INNER JOIN tblExamGrp ON ... that the crosstab query in access has much more capablities than ...
    (microsoft.public.access.queries)
  • Re: Matching records for an update query
    ... then the update query would look something like ... UPDATE RegisteredMembers INNER JOIN BusinessChanges ...
    (microsoft.public.access.queries)
  • Re: Ranking query
    ... I expect that using a named query (as opposed to its SQL) will be OK. ... INNER JOIN qryRepairs AS I2 ...
    (microsoft.public.access.queries)