Xtab query question.

F

Frank Martin

I am trying to put a criteria into a xtab
query via the Combo on a form.

I use the builder to get
"Forms![FrmPopupCustProd]![Combo]0"
and this is inserted into the criteria field
of the xtab query.

But the query opens to give no results at
all.

Is this the wrong treatment for a crosstab
query?

Please help, Frank
 
A

Allen Browne

A few suggestions, Frank:

1. Is the zero at the end really part of the parameter?
(Perhaps it should read Combo0 inside the square brackets?)

2. Make sure the field you apply this criteria under reads Where in the
Total row. If you need to show the output of the field, you might have it in
2 columns: one for the Group By or whatever, and this one showing Where.

3. Declare the parameter. In query design view, choose Parameters on the
Query menu, and enter the parameter and data type. For example, if the Bound
Column of Combo0 is a Number field of size Long Integer, enter:
[Forms]![FrmPopupCustProd]![Combo0] Long

4. If there are Null values in the field, they will not be returned.

5. If the focus is still in the combo on the form, its Value may not be
updated yet. Tab out of the combo to update the Value.

6. If the parameter used under a field of type Text, you may have struck
this bug in JET:
Parameter of type Text is evaluated wrongly
at:
http://allenbrowne.com/bug-13.html

7. Other general suggestions for crosstabs:
Crosstab query techniques
at:
http://allenbrowne.com/ser-67.html
 
F

Frank Martin

Thanks, I'll check. The query works fine
manually.

"Allen Browne" <[email protected]>
wrote in message
A few suggestions, Frank:

1. Is the zero at the end really part of
the parameter?
(Perhaps it should read Combo0 inside the
square brackets?)

2. Make sure the field you apply this
criteria under reads Where in the Total
row. If you need to show the output of the
field, you might have it in 2 columns: one
for the Group By or whatever, and this one
showing Where.

3. Declare the parameter. In query design
view, choose Parameters on the Query menu,
and enter the parameter and data type. For
example, if the Bound Column of Combo0 is a
Number field of size Long Integer, enter:
[Forms]![FrmPopupCustProd]![Combo0]
Long

4. If there are Null values in the field,
they will not be returned.

5. If the focus is still in the combo on
the form, its Value may not be updated yet.
Tab out of the combo to update the Value.

6. If the parameter used under a field of
type Text, you may have struck this bug in
JET:
Parameter of type Text is evaluated
wrongly
at:
http://allenbrowne.com/bug-13.html

7. Other general suggestions for crosstabs:
Crosstab query techniques
at:
http://allenbrowne.com/ser-67.html

--
Allen Browne - Microsoft MVP. Perth,
Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at
mvps dot org.

message
I am trying to put a criteria into a xtab
query via the Combo on a form.

I use the builder to get
"Forms![FrmPopupCustProd]![Combo]0"
and this is inserted into the criteria
field of the xtab query.

But the query opens to give no results at
all.

Is this the wrong treatment for a crosstab
query?
 
F

Frank Martin

I have decided to convert the text primary
key to an autonumber one before I do any more
work on this.


"Allen Browne" <[email protected]>
wrote in message
A few suggestions, Frank:

1. Is the zero at the end really part of
the parameter?
(Perhaps it should read Combo0 inside the
square brackets?)

2. Make sure the field you apply this
criteria under reads Where in the Total
row. If you need to show the output of the
field, you might have it in 2 columns: one
for the Group By or whatever, and this one
showing Where.

3. Declare the parameter. In query design
view, choose Parameters on the Query menu,
and enter the parameter and data type. For
example, if the Bound Column of Combo0 is a
Number field of size Long Integer, enter:
[Forms]![FrmPopupCustProd]![Combo0]
Long

4. If there are Null values in the field,
they will not be returned.

5. If the focus is still in the combo on
the form, its Value may not be updated yet.
Tab out of the combo to update the Value.

6. If the parameter used under a field of
type Text, you may have struck this bug in
JET:
Parameter of type Text is evaluated
wrongly
at:
http://allenbrowne.com/bug-13.html

7. Other general suggestions for crosstabs:
Crosstab query techniques
at:
http://allenbrowne.com/ser-67.html

--
Allen Browne - Microsoft MVP. Perth,
Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at
mvps dot org.

message
I am trying to put a criteria into a xtab
query via the Combo on a form.

I use the builder to get
"Forms![FrmPopupCustProd]![Combo]0"
and this is inserted into the criteria
field of the xtab query.

But the query opens to give no results at
all.

Is this the wrong treatment for a crosstab
query?
 

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