CrossTab Query Value Field Changes by Selection

G

Guest

With Martin's assistance, I am now able to prompt the user to select a
specific month out of a twelve month year to create a speadsheet for that
month only. I now need to turn that spreadsheet --- which ONLY incudes the
[Selected Month] into a crosstab query.
Query #1: Create query with prompt box for month: "SELECT Store#, AcctType
, " & InputBox("Type month") & " FROM myTable;"
Query #2: Create a CrossTab query based on query #1

I thought that the [Selected Month] would carry through the remaining
queries. However, I loose the Crosstab query each time the selected month
changes.

How do I change the [Selected Month] For SUM(SelectedMo) AS SumOfSelectedMo
in the Crosstab query based off of the Select Month query?

TRANSFORM Sum(qryRT_MoCombinedData.OCT) AS SumOfOCT
SELECT [tblRT_D3AcctData].[StoreNo] AS StoreNo
FROM qryRT_MoCombinedData
GROUP BY [tblRT_D3AcctData].[StoreNo]
PIVOT [tblRT_AcctList].[DescMstr];
 
G

Guest

you've started a new thread - I've posted an answer to the other one which
will hopefully help: you should be able to build the crosstab SQL code into
the first query so you don't need a second query
 

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