Query in crosstab won't reference field on form

  • Thread starter Thread starter Robert
  • Start date Start date
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
 
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
 
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
 
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
 
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
 
Back
Top