Parameter Querie

  • Thread starter Thread starter Omar
  • Start date Start date
O

Omar

I have a crosstab querie whose criteria is set to:

Between [Forms]![Print_selection]![start_date] And [Forms]!
[Print_selection]![End_date]

This line of code is suppose to get inputs for a between
[start date] and [end date] command from a set of
controls on a print form. But I get an error, even after I
set the value of end_date and start_date on the parameter
menu as date\time.

The error reads:

Microsoft Jet Enginee.. Does not recognize [Forms]!
[Print_selection]![start_date]

Any suggestions, thanks..
 
I have a crosstab querie whose criteria is set to:

Between [Forms]![Print_selection]![start_date] And [Forms]!
[Print_selection]![End_date]

You can define a query's Parameters in any query... but for a crosstab
query you MUST do so. Open the query in design view and select View...
Parameters, or right mouseclick behind the table icons and select
Parameters. Copy and paste the [Forms]![... references to the left
column of the parameters window, and specify that they are of Date
type.
 
Crosstab queries require their parameters to be defined. In design view go
to Query, Parameters and put
[Forms]![Print_selection]![start_date] in the first cell, and set the data
type to date/time
[Forms]![Print_selection]![end_date in the second row, and set it to
date/time
 
Thanks for the responds. I tried to do this and the querie
works fine, but when I try to open or print the report
created from that querie, it does not work. I receive this
error:
"The microsoft jet engine does not recognize " as a valid
name or expression."

In addition, when I try to open the report, which again
was created from this querie, it prompts me four times for
the dates.

So i assumed that something was wrong with report, and I
tried to create another report based on this querie but
access report wizard does not show any fields under the
querie.

Troubleshooting, I found that the caused of this problem
is attributed to typing [Forms]![Print_selection]!
[start_date] into the parameter menu. What can I do? Thanks

-----Original Message-----
I have a crosstab querie whose criteria is set to:

Between [Forms]![Print_selection]![start_date] And [Forms]!
[Print_selection]![End_date]

You can define a query's Parameters in any query... but for a crosstab
query you MUST do so. Open the query in design view and select View...
Parameters, or right mouseclick behind the table icons and select
Parameters. Copy and paste the [Forms]![... references to the left
column of the parameters window, and specify that they are of Date
type.



.
 
Troubleshooting, I found that the caused of this problem
is attributed to typing [Forms]![Print_selection]!
[start_date] into the parameter menu. What can I do? Thanks

Do you have an open Form named Print_Selection with a control named
Start_Date at the time you execute this code? Does start_date contain
a valid date?
 
Back
Top