Custom Parameter Form Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I created a custom form to supply parameters to a report based upon a
crosstab query. The form seems to operate fine, except it only will accept a
single set of values, as if it is storing the values it wants to respond
to...!

The parameter form asks for [Summary Date] and [Summary Iteration]. The
underlying crosstab query has rows where [Summary Date] = 5/12/05, 5/17/05,
5/20/05 and [Summary Iteration] = 1,2.

Using my custom parameter form (in the Open Event of the report), everything
works fine when I enter 5/20/05 for [Summary Date] and 1 for [Summary
Iteration]. However when I enter any other valid combination of values for
[Summary Date] and [Summary Iteration] I get the error message "The Microsoft
Jet database engine does not recognize “ as a valid field name or expression."

When I run the crosstab query from the Database Window, I can successfully
enter any valid combination of values to the 'Enter Parameter Value' pop-ups
and the correct Datasheet view comes up...

Do you know how to correct the error in my custom parameter form?

Thanks!
 
I'm not sure I follow you, but I think you are saying that you are using the
report's Open event to open a form into which you enter parameters. I would
have the criteria form be unbound. In the report's Record Source Query, the
criteria for SummaryDate would be [Forms]![frmParam]![txtSummaryDate]. Make
sure txtSummaryDate is formatted as Date.
The parameter form needs to stay open at least until the report is open.
One approach is just to hide it, then to have the report's Close event close
the parameter form.
You could test the parameter query by simply entering [Summary Date] as the
criteria for Summary Date, then running the query (by changing to datasheet
view).
 
Back
Top