views:

134

answers:

1

I made query that accepts two parameters. Now I want to use that query in the expressionbuilder for a textfield in a report. I want to pass the parameters in the expression. How do I do that? The code for the query in the expression is like [queryname]![returnfield].

A: 

You can't do what you want to do. You need to remove the parameter from the saved QueryDef and provide the criteria at runtime, perhaps with a DLookup(). More information about the ControlSource of the textbox on your report would be helpful in answering your question. It might make more sense to have the source query as part of the Recordsource of the report, with an appropriate join.

David-W-Fenton