Query in crosstab won't reference field on form

R

Robert

I have a select query consisting of a main table and several lookup tables
joined to it. This query references a field on a form. It works. But when
I make a crosstab query out of this query I get a prompt for the referenced
field even thought the referenced form is open.

There may be more than one way of going about fixing this. I thought of
making it all into one query but I 'm not sure of the syntax or if it's even
possible. The crosstab is executed from the results of the first query.

What is the best way to create a crosstab based on a query if that query
references a field on a form?

Robert
 
R

Rob Parker

Hi Robert,

I suspect that you haven't defined the parameter for the cross-tab query.
You can get away without doing that for most query types, but for a
cross-tab you must do it. With the query open in design view, select
Parameters from the Query menu; enter the control from the form (ie.
[Forms].[FormName].[ControlName]) in the Parameter column, and the datatype
in the Data Type column of the dialog box. Save the modified query.

HTH,

Rob
 
R

Robert

The parameter isn't in the crosstab query.

Rob Parker said:
Hi Robert,

I suspect that you haven't defined the parameter for the cross-tab query.
You can get away without doing that for most query types, but for a
cross-tab you must do it. With the query open in design view, select
Parameters from the Query menu; enter the control from the form (ie.
[Forms].[FormName].[ControlName]) in the Parameter column, and the
datatype in the Data Type column of the dialog box. Save the modified
query.

HTH,

Rob
I have a select query consisting of a main table and several lookup
tables joined to it. This query references a field on a form. It
works. But when I make a crosstab query out of this query I get a
prompt for the referenced field even thought the referenced form is
open.
There may be more than one way of going about fixing this. I thought
of making it all into one query but I 'm not sure of the syntax or if
it's even possible. The crosstab is executed from the results of the
first query.
What is the best way to create a crosstab based on a query if that
query references a field on a form?

Robert
 
D

Duane Hookom

The parameter doesn't have to be in the crosstab. Did you try the suggestion
from the other Rob?

--
Duane Hookom
Microsoft Access MVP


Robert said:
The parameter isn't in the crosstab query.

Rob Parker said:
Hi Robert,

I suspect that you haven't defined the parameter for the cross-tab query.
You can get away without doing that for most query types, but for a
cross-tab you must do it. With the query open in design view, select
Parameters from the Query menu; enter the control from the form (ie.
[Forms].[FormName].[ControlName]) in the Parameter column, and the
datatype in the Data Type column of the dialog box. Save the modified
query.

HTH,

Rob
I have a select query consisting of a main table and several lookup
tables joined to it. This query references a field on a form. It
works. But when I make a crosstab query out of this query I get a
prompt for the referenced field even thought the referenced form is
open.
There may be more than one way of going about fixing this. I thought
of making it all into one query but I 'm not sure of the syntax or if
it's even possible. The crosstab is executed from the results of the
first query.
What is the best way to create a crosstab based on a query if that
query references a field on a form?

Robert
 
J

John W. Vinson

Ummm... than add it. That's what Rob is suggesting as the solution to your
problem.
The parameter isn't in the crosstab query.

Rob Parker said:
Hi Robert,

I suspect that you haven't defined the parameter for the cross-tab query.
You can get away without doing that for most query types, but for a
cross-tab you must do it. With the query open in design view, select
Parameters from the Query menu; enter the control from the form (ie.
[Forms].[FormName].[ControlName]) in the Parameter column, and the
datatype in the Data Type column of the dialog box. Save the modified
query.

HTH,

Rob
I have a select query consisting of a main table and several lookup
tables joined to it. This query references a field on a form. It
works. But when I make a crosstab query out of this query I get a
prompt for the referenced field even thought the referenced form is
open.
There may be more than one way of going about fixing this. I thought
of making it all into one query but I 'm not sure of the syntax or if
it's even possible. The crosstab is executed from the results of the
first query.
What is the best way to create a crosstab based on a query if that
query references a field on a form?

Robert
 

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