Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Description in CrossTab based on Form Checkbox

Status
Not open for further replies.

sxschech

Technical User
Joined
Jul 11, 2002
Messages
1,034
Location
US
I have this code in a Select Query which works.
Code:
SELECT tblChart.RunDate, tblChart.WeekNo, tblChart.Term, tblChart.Status, [red]IIf([Forms]![frmMain]![chkCensus]=True,Replace([tblChart].[DisplayStatus],"Intend","Enrolled"),[tblChart].[DisplayStatus]) AS DisplayStatus[/red], tblChart.TOT
FROM tblChart;

If I add the statement in [red]red[/red] to a crosstab, I get an error "The Microsoft Jet database engine does not recognize '[Forms]![frmMain]![chkCensus]' as a valid field name or expression"

I also tried the statement in a select query that uses the crosstab as its source as well as using the above query as the source for the cross tab. In either case, the error happened whenever the crosstab was involved.

Ultimately I need to be able to change the wording that is shown on a legend in a report and am not sure how else to get the data into the legend other than changing the description displayed by the red statement.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top