crosstab query with parameter query

J

jmoore

I tried to create a crosstab query based on a parameter query and received an
error message that the MS Jet database engine does not recognize "[Start
Date:]" as a valid field name or expression. Is there a better way to create
a report with start and end date parameters with crosstab data? Thanks.
 
J

Jerry Whittle

You probably need to open up the parameter query in design view. Go up to
Query, Parameter and put in [Start > Date:] in the left column and select
Date/Time in the second column. Make sure that the parameter in the criteria
exactly matches the entry in parameter.

If you have some sort of Stop date parameter, make sure it's there too.
 
J

jmoore

Hi Jerry, Thank you for solving my problem with the query. However, I
thought I would be able to create a report from this query and that is not
working correctly. Selecting this query using the report wizard does not
show any fields to choose. In report design view, there are no fields in the
field chooser when I set the record source to this query. Can you help with
this problem or should I post another question in the reports group.

Jerry Whittle said:
You probably need to open up the parameter query in design view. Go up to
Query, Parameter and put in [Start > Date:] in the left column and select
Date/Time in the second column. Make sure that the parameter in the criteria
exactly matches the entry in parameter.

If you have some sort of Stop date parameter, make sure it's there too.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

jmoore said:
I tried to create a crosstab query based on a parameter query and received an
error message that the MS Jet database engine does not recognize "[Start
Date:]" as a valid field name or expression. Is there a better way to create
a report with start and end date parameters with crosstab data? Thanks.
 
J

Jerry Whittle

For a report you need to know the column headings or it will bomb out. There
are two ways of doing this. The first is to prepopulate the Column Headings
property of the crosstab query. That way the text boxes on the reports will
always know where to find the data. It has other benefits such as putting the
columns in a order that you like (such as months in chronological order
instead of April, August, etc.). It will also hold open a field such as for a
month that had no data or exclude a month if you don't want to see June for
example.

There is code out there to dynamically change a report to match the results
of a crosstab. Google for Access Crosstab Reports. Here's one from Roger
Carlson:

http://www.rogersaccesslibrary.com/download3.asp?SampleName=CrossTabReport.mdb
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

jmoore said:
Hi Jerry, Thank you for solving my problem with the query. However, I
thought I would be able to create a report from this query and that is not
working correctly. Selecting this query using the report wizard does not
show any fields to choose. In report design view, there are no fields in the
field chooser when I set the record source to this query. Can you help with
this problem or should I post another question in the reports group.

Jerry Whittle said:
You probably need to open up the parameter query in design view. Go up to
Query, Parameter and put in [Start > Date:] in the left column and select
Date/Time in the second column. Make sure that the parameter in the criteria
exactly matches the entry in parameter.

If you have some sort of Stop date parameter, make sure it's there too.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

jmoore said:
I tried to create a crosstab query based on a parameter query and received an
error message that the MS Jet database engine does not recognize "[Start
Date:]" as a valid field name or expression. Is there a better way to create
a report with start and end date parameters with crosstab data? Thanks.
 
P

pcbins

I tried downloading and opening this sample database and it said it was
located outside my intranet or on an untrusted site adn would not open it...

Jerry Whittle said:
For a report you need to know the column headings or it will bomb out. There
are two ways of doing this. The first is to prepopulate the Column Headings
property of the crosstab query. That way the text boxes on the reports will
always know where to find the data. It has other benefits such as putting the
columns in a order that you like (such as months in chronological order
instead of April, August, etc.). It will also hold open a field such as for a
month that had no data or exclude a month if you don't want to see June for
example.

There is code out there to dynamically change a report to match the results
of a crosstab. Google for Access Crosstab Reports. Here's one from Roger
Carlson:

http://www.rogersaccesslibrary.com/download3.asp?SampleName=CrossTabReport.mdb
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

jmoore said:
Hi Jerry, Thank you for solving my problem with the query. However, I
thought I would be able to create a report from this query and that is not
working correctly. Selecting this query using the report wizard does not
show any fields to choose. In report design view, there are no fields in the
field chooser when I set the record source to this query. Can you help with
this problem or should I post another question in the reports group.

Jerry Whittle said:
You probably need to open up the parameter query in design view. Go up to
Query, Parameter and put in [Start > Date:] in the left column and select
Date/Time in the second column. Make sure that the parameter in the criteria
exactly matches the entry in parameter.

If you have some sort of Stop date parameter, make sure it's there too.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

:

I tried to create a crosstab query based on a parameter query and received an
error message that the MS Jet database engine does not recognize "[Start
Date:]" as a valid field name or expression. Is there a better way to create
a report with start and end date parameters with crosstab data? Thanks.
 
J

John W. Vinson

I tried downloading and opening this sample database and it said it was
located outside my intranet or on an untrusted site adn would not open it...

Talk to whoever is in charge of your network. This is a restriction that they
have put into place (presumably to keep unauthorized downloads, such as porn
or viruses) off your network. You'll need to get their permission to download
it. Good luck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top