Results 1 to 1 of 1
2006-05-16, 19:43 #1
- Join Date
- Jun 2001
- Salem, Oregon, USA
- Thanked 0 Times in 0 Posts
Subform/report Query Limitations (AccessXP SP3)
Just in case this might be helpful for some other miserable soul (I did lose *some* hair):
The error message is: "You can't use a pass-through query or a non-fixed-column crosstab query as a record source for a subform or subreport."
There is one other thread on this Lounge that relates to the crosstab side of it, and, although I did have a crosstab as part of my query, that didn't seem to be the problem.
The problem was that I was passing a prompted parameter within the query -- that is, I had a flexi-title parameter named "[EnterDesiredTitleHere]," one or two queries back from the final query.
The nested subreport was basically built off of the same recordsource as the main report, but I did some summary statistics on it. The subreport really didn't need the prompted title, so I went for overkill and created two tandem queries, one that had the prompt and one that did not, and built the summary statistics off of the one that did not have the prompt.
Earlier, I had some nice code that was run before the report was run, and the report received the data as openargs, which didn't generate this error. But it turned out that the openarg information did not print with a "docmd.outputto ..etc" command, and although it could display with a "runcommand acCmdOutputToRTF" call, on the "acCmd" one I couldn't control the destination (and would end up having to write code to move it from one destination to another). So I switched back to the prompted parameter, which generated this, frustrating error message.
I don't know if this will help someone in the future, but I'm posting it in the event that it might be useful.