query error with combo box

B

Brian L

I'm doing a cross-tab query and using one Where clause that looks up a value
in a combo box. No matter how I build the criteria, I always get message:

"MS JET DB does not recognize '[Forms]![frm1]![cboName] as a valid field.

Oddly enough, it works fine on my other form. Any ideas?
 
J

Jerry Whittle

Crosstabs can be a problem especially with parameters which it might think
that your form is.

Try creating a normal query just to pull the appropriate records. Next build
your crosstab query based on the first query.
 
B

Brian L

Thanks. That partially worked. When I format the date to Monthly, it works
fine with the combo box criteria. But if formatted quareterly, it doesn't
like it one bit. Errors out right away. Perhaps I need to hard code the
output in SQL view? Who knows...

Jerry Whittle said:
Crosstabs can be a problem especially with parameters which it might think
that your form is.

Try creating a normal query just to pull the appropriate records. Next build
your crosstab query based on the first query.
--
Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


Brian L said:
I'm doing a cross-tab query and using one Where clause that looks up a value
in a combo box. No matter how I build the criteria, I always get message:

"MS JET DB does not recognize '[Forms]![frm1]![cboName] as a valid field.

Oddly enough, it works fine on my other form. Any ideas?
 
D

Duane Hookom

You must specify the data types of your parameters in crosstabs (unless you
include the column headings property) Select Query->Parameters and enter
Forms!frm1!cboName Text

--
Duane Hookom
MS Access MVP


Brian L said:
Thanks. That partially worked. When I format the date to Monthly, it works
fine with the combo box criteria. But if formatted quareterly, it doesn't
like it one bit. Errors out right away. Perhaps I need to hard code the
output in SQL view? Who knows...

Jerry Whittle said:
Crosstabs can be a problem especially with parameters which it might
think
that your form is.

Try creating a normal query just to pull the appropriate records. Next
build
your crosstab query based on the first query.
--
Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


Brian L said:
I'm doing a cross-tab query and using one Where clause that looks up a
value
in a combo box. No matter how I build the criteria, I always get
message:

"MS JET DB does not recognize '[Forms]![frm1]![cboName] as a valid
field.

Oddly enough, it works fine on my other form. Any ideas?
 

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