BobRosas
asked on
Not valid field error when using crosstab query as record source for report
I created a report using a crosstab query as the source. Everything works fine as long as the criteria the user selects includes data for all the columns. What do you do if it doesn't? How do I get around the error and just leave that column blank?
Thanks in advance.
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Disregard above. I thought I could name the columns anything I wanted but as soon as I named the columns to match the field names the data showed. The report seems to be working now. I couldn't have done it without you guys. Thanks you both for your help.
ASKER
Thanks so much!
CodeA
TRANSFORM Count(tblMTRptAge.AgeCount
SELECT tblMTRptAge.County, tblMTRptAge.ServiceLkUpID,
FROM tblMTRptAge
GROUP BY tblMTRptAge.County, tblMTRptAge.ServiceLkUpID
PIVOT tblMTRptAge.AgeGrp;
CodeB
TRANSFORM Count(tblMTRptAge.AgeCount
SELECT tblMTRptAge.County, tblMTRptAge.ServiceLkUpID,
FROM tblMTRptAge
GROUP BY tblMTRptAge.County, tblMTRptAge.ServiceLkUpID
PIVOT tblMTRptAge.AgeGrp In ("To16","To24","To34","To4