Yes. This is the order I am asked for parameter when I
run the report:
StartDate
EndDate
StartDate
EndDate
And now it is starting to ask me a third time.
-----Original Message-----
I am creating a report from a crosstab query. The query
is working great. I can select a StartDate and an EndDate
for parameters.
When I create my report and run it, it asks for the
parameters two different times and then it tell me that
it is too complicated to run.
Does anyone have any suggestions?
Did you enter the 2 parameters in the Query Parameter dialog with
their datatypes.
In a Crosstab query you must.
In query design view:
Query + Parameters
[Start Date] DateTime
[End Date] DateTime
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
Are you sure the prompts are from the query and not from some unbound
control in the report?
Easiest way to resolve the problem is to create a parameter entry form
with the controls to enter the date in.
Set the controls format property to any valid date format.
Change the query criteria from
Between [EnterStart] and [EnterEnd]
to
Between forms!FormName!StartControl and forms!FormName!EndControl
Add a command button to the form
Code it's click event:
Me.Visible = false
Code the Report's Open Event:
DoCmd.OpenForm "FormName", , , , , acDialog
Code the Report's Close event:
DoCmd.Close acForm, "FormName"
When you run the report, it will open the form.
Enter the 2 dates.
Click the command button.
The report should display/print without asking for any additional
parameters.
If there is another query used as record source for this crosstab
query, and it uses the same parameters, make sure you change them to
the same forms!formName!ControlName syntax.
If the report has a control to print out the criteria used in the
query, change that control's control source to match the syntax also,
i.e. ="For sales between " & forms!FormName!StartControl & " and " &
forms!FormName!EndControl