View Full Version : Re: Form Paramanters in Query


pdbaker
08-01-2008, 03:51 AM
I have a form with two combo boxes they get a start date and a end date and are named as cboStartDate and cboEndDate. You then select a report name from another combo box and hit a button and it opens up the report.

I have put in a query say for the first report in the criteria

[Forms]![reports_subform]![cboStartDate] Or [Forms]![reports_subform]![cboEndDate]

or have also tried Where [Forms]![reports_subform]![cboStartDate] and [Forms]![reports_subform]![cboEndDate]

But when i run the report it keeps bringing up the enter parameter query box so what is happening am i doign something wrong.

burrcm
08-01-2008, 04:29 AM
Between [Forms]![form name]![cboStartDate] And [Forms]![form name]![cboEndDate]

Chris B

pdbaker
08-01-2008, 05:46 AM
I have tried using

Between [Forms]![form name]![cboStartDate] And [Forms]![form name]![cboEndDate] and this works on the reports form on its own if i access the reports form as a subform from the main form it still asks for me to enter a paramater value.

what else could that be.

sbenj69
08-01-2008, 06:49 AM
I have a form with two combo boxes they get a start date and a end date and are named as cboStartDate and cboEndDate. You then select a report name from another combo box and hit a button and it opens up the report.

I have put in a query say for the first report in the criteria

[Forms]![reports_subform]![cboStartDate] Or [Forms]![reports_subform]![cboEndDate]

or have also tried Where [Forms]![reports_subform]![cboStartDate] and [Forms]![reports_subform]![cboEndDate]

But when i run the report it keeps bringing up the enter parameter query box so what is happening am i doign something wrong.

Try this:

Between [Forms]![YourMainFormNameHere].[reports_subform].[Form]![cboStartDate] And [Forms]![YourMainFormNameHere].[reports_subform].[Form]![cboEndDate]

I think that should work.