Hi Kevin,
I put together a dataset as you described. OpNum is numeric, and Reason is
text and will hold
data such as "Reason1", "Reason2", "Reason3" etc. tblCrossTab with only the
above two fields.
Then I built two queries:
This is "qryCrossTab"
SELECT tblCrossTab.OpNum, tblCrossTab.Reason, Count(*) AS cnt
FROM tblCrossTab
GROUP BY tblCrossTab.OpNum, tblCrossTab.Reason;
This is "qryCrossTab_CrossTab"
TRANSFORM sum(qryCrossTab.cnt) AS SumOfcnt
SELECT qryCrossTab.OpNum, sum(qryCrossTab.cnt) AS [Total Of cnt]
FROM qryCrossTab
GROUP BY qryCrossTab.OpNum
PIVOT qryCrossTab.Reason;
and returns this data:
qryCrossTab_Crosstab OpNum Total Of cnt Reason1 Reason2
10 40 21 19
20 37 22 15
HTH -Linda
> Hi
> I have a table with several fields i.e
[quoted text clipped - 24 lines]
>
> kevin
Kevin - 11 Feb 2005 18:50 GMT
thanks for reply that solved my problem
however if i wanted to and component price to the query it gives me
the same results as before ie duplicate op numbers, i think this is
because the component prices are grouped(new at this)could you tell me
how i can get the coponent price into the query and then onto the
report and stillreturn just on occurence of op number
thanks
kevin
> Hi Kevin,
>
[quoted text clipped - 53 lines]
> >
> > kevin