Querying based on selection in a combo box...

  • Thread starter Thread starter T.
  • Start date Start date
T

T.

Hey everyone, hope someone is able to help me out...

I have a great little query that is working great in query design. The
problem is that the end result is going to be a report that is run from a
form. The important criteria for the query is going to be selected from a
combo box on a form and when I run it in the query design, manually type in
the criteria it works like a charm. When I try to run it from the form with
the criteria selected it still pops up asking for the criteria. It is like
it isn't even recognizing that my combo control has the data it needs.

I am sure that I am just not referencing the field on the form properly in
my query statement but for some reason I can't get it to work.

Anyone have any ideas??? Please let me know if you would like to see the
SQL behind it.

Thanks,

T.
 
Make sure that the form is unbound. next make sure that
your criteria in the query is as follows:
[forms]![frmname]![combo#]
if this doesn't help at all, post sql
 
Yup, that was it, I had one extra '!' at the beginning.

Many thanks!!

T.


mate said:
Make sure that the form is unbound. next make sure that
your criteria in the query is as follows:
[forms]![frmname]![combo#]
if this doesn't help at all, post sql


-----Original Message-----
Hey everyone, hope someone is able to help me out...

I have a great little query that is working great in query design. The
problem is that the end result is going to be a report that is run from a
form. The important criteria for the query is going to be selected from a
combo box on a form and when I run it in the query design, manually type in
the criteria it works like a charm. When I try to run it from the form with
the criteria selected it still pops up asking for the criteria. It is like
it isn't even recognizing that my combo control has the data it needs.

I am sure that I am just not referencing the field on the form properly in
my query statement but for some reason I can't get it to work.

Anyone have any ideas??? Please let me know if you would like to see the
SQL behind it.

Thanks,

T.


.
 
Back
Top