Expression in Query Criteria

J

jwinder

New Problem: Is there a way to have the expression in the Query Criteria box
search for values in a pull down list in a Combo Box on the query Form?
I.E. say there are four values in the combo box pull down list ( Cat, Dog,
Fish, Bird). If one of those values is selected (Dog) via the pull down list,
what does the expression have to look like to search for the selected value
(Dog)?
 
J

jwinder

nope..didn't work. :-(

this what I entered:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
(When I saved it, it put in the extra Brackets around Me. and Basic_Category)

This is what I put into the other fields:
Like "*" & [Forms]![QueryFormName]![FieldName] & "*"
 
K

Klatuu

Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
I'm curious as to why you have basiccategory in criteria twice. Try it like
this:
Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]

jwinder said:
nope..didn't work. :-(

this what I entered:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
(When I saved it, it put in the extra Brackets around Me. and Basic_Category)

This is what I put into the other fields:
Like "*" & [Forms]![QueryFormName]![FieldName] & "*"

Klatuu said:
Refer to the value of the combo box in the query's criteria box

Me.MyCombo
 
J

jwinder

seems llike I have something in there too many times... I now have the
following:
Like [forms]![Query - Catalog Append Table]![Basic_Category] &
[Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![Query - Catalog Append
Table]![Basic_Category]

When I run the Query (with no criteria in any of the fields) i get a pop up
box with the title "enter Parameter Value" and below that
"Forms!Query-Catalog Append" then a blank List Box.


Klatuu said:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
I'm curious as to why you have basiccategory in criteria twice. Try it like
this:
Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]

jwinder said:
nope..didn't work. :-(

this what I entered:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
(When I saved it, it put in the extra Brackets around Me. and Basic_Category)

This is what I put into the other fields:
Like "*" & [Forms]![QueryFormName]![FieldName] & "*"

Klatuu said:
Refer to the value of the combo box in the query's criteria box

Me.MyCombo

:

New Problem: Is there a way to have the expression in the Query Criteria box
search for values in a pull down list in a Combo Box on the query Form?
I.E. say there are four values in the combo box pull down list ( Cat, Dog,
Fish, Bird). If one of those values is selected (Dog) via the pull down list,
what does the expression have to look like to search for the selected value
(Dog)?
 
K

Klatuu

Now you are up to 3 times. Is this all in the criteria for one column in the
query? It doesn't seem to make any sense.

jwinder said:
seems llike I have something in there too many times... I now have the
following:
Like [forms]![Query - Catalog Append Table]![Basic_Category] &
[Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![Query - Catalog Append
Table]![Basic_Category]

When I run the Query (with no criteria in any of the fields) i get a pop up
box with the title "enter Parameter Value" and below that
"Forms!Query-Catalog Append" then a blank List Box.


Klatuu said:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
I'm curious as to why you have basiccategory in criteria twice. Try it like
this:
Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]

jwinder said:
nope..didn't work. :-(

this what I entered:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
(When I saved it, it put in the extra Brackets around Me. and Basic_Category)

This is what I put into the other fields:
Like "*" & [Forms]![QueryFormName]![FieldName] & "*"

:

Refer to the value of the combo box in the query's criteria box

Me.MyCombo

:

New Problem: Is there a way to have the expression in the Query Criteria box
search for values in a pull down list in a Combo Box on the query Form?
I.E. say there are four values in the combo box pull down list ( Cat, Dog,
Fish, Bird). If one of those values is selected (Dog) via the pull down list,
what does the expression have to look like to search for the selected value
(Dog)?
 
J

jwinder

yes...one column. I was just doing what I thought you asked me to do...

you wrote: Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query -
Catalog Append Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]


Klatuu said:
Now you are up to 3 times. Is this all in the criteria for one column in the
query? It doesn't seem to make any sense.

jwinder said:
seems llike I have something in there too many times... I now have the
following:
Like [forms]![Query - Catalog Append Table]![Basic_Category] &
[Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![Query - Catalog Append
Table]![Basic_Category]

When I run the Query (with no criteria in any of the fields) i get a pop up
box with the title "enter Parameter Value" and below that
"Forms!Query-Catalog Append" then a blank List Box.


Klatuu said:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
I'm curious as to why you have basiccategory in criteria twice. Try it like
this:
Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]

:

nope..didn't work. :-(

this what I entered:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
(When I saved it, it put in the extra Brackets around Me. and Basic_Category)

This is what I put into the other fields:
Like "*" & [Forms]![QueryFormName]![FieldName] & "*"

:

Refer to the value of the combo box in the query's criteria box

Me.MyCombo

:

New Problem: Is there a way to have the expression in the Query Criteria box
search for values in a pull down list in a Combo Box on the query Form?
I.E. say there are four values in the combo box pull down list ( Cat, Dog,
Fish, Bird). If one of those values is selected (Dog) via the pull down list,
what does the expression have to look like to search for the selected value
(Dog)?
 
K

Klatuu

hmmmm, I thought I had copied from your post. You only need it one time:
Like [forms]![MyFormName]![Basic_Category]
jwinder said:
yes...one column. I was just doing what I thought you asked me to do...

you wrote: Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query -
Catalog Append Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]


Klatuu said:
Now you are up to 3 times. Is this all in the criteria for one column in the
query? It doesn't seem to make any sense.

jwinder said:
seems llike I have something in there too many times... I now have the
following:
Like [forms]![Query - Catalog Append Table]![Basic_Category] &
[Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![Query - Catalog Append
Table]![Basic_Category]

When I run the Query (with no criteria in any of the fields) i get a pop up
box with the title "enter Parameter Value" and below that
"Forms!Query-Catalog Append" then a blank List Box.


:

Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
I'm curious as to why you have basiccategory in criteria twice. Try it like
this:
Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]

:

nope..didn't work. :-(

this what I entered:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
(When I saved it, it put in the extra Brackets around Me. and Basic_Category)

This is what I put into the other fields:
Like "*" & [Forms]![QueryFormName]![FieldName] & "*"

:

Refer to the value of the combo box in the query's criteria box

Me.MyCombo

:

New Problem: Is there a way to have the expression in the Query Criteria box
search for values in a pull down list in a Combo Box on the query Form?
I.E. say there are four values in the combo box pull down list ( Cat, Dog,
Fish, Bird). If one of those values is selected (Dog) via the pull down list,
what does the expression have to look like to search for the selected value
(Dog)?
 
J

jwinder

nope..still did not work. I now have
Like [Forms]![Query - Catalog Append Table]![Basic_Category]

Should the [Basic_Category] be the field name of the table or the name of
the Combo Box? As it is, it is the name of the Combo Box.

Klatuu said:
hmmmm, I thought I had copied from your post. You only need it one time:
Like [forms]![MyFormName]![Basic_Category]
jwinder said:
yes...one column. I was just doing what I thought you asked me to do...

you wrote: Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query -
Catalog Append Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]


Klatuu said:
Now you are up to 3 times. Is this all in the criteria for one column in the
query? It doesn't seem to make any sense.

:

seems llike I have something in there too many times... I now have the
following:
Like [forms]![Query - Catalog Append Table]![Basic_Category] &
[Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![Query - Catalog Append
Table]![Basic_Category]

When I run the Query (with no criteria in any of the fields) i get a pop up
box with the title "enter Parameter Value" and below that
"Forms!Query-Catalog Append" then a blank List Box.


:

Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
I'm curious as to why you have basiccategory in criteria twice. Try it like
this:
Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]

:

nope..didn't work. :-(

this what I entered:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
(When I saved it, it put in the extra Brackets around Me. and Basic_Category)

This is what I put into the other fields:
Like "*" & [Forms]![QueryFormName]![FieldName] & "*"

:

Refer to the value of the combo box in the query's criteria box

Me.MyCombo

:

New Problem: Is there a way to have the expression in the Query Criteria box
search for values in a pull down list in a Combo Box on the query Form?
I.E. say there are four values in the combo box pull down list ( Cat, Dog,
Fish, Bird). If one of those values is selected (Dog) via the pull down list,
what does the expression have to look like to search for the selected value
(Dog)?
 
K

Klatuu

Should be the name of the combo box. I wonder if because you are using LIKE,
it should be :

Like "'" & [Forms]![Query - Catalog Append Table]![Basic_Category] & "'"

jwinder said:
nope..still did not work. I now have
Like [Forms]![Query - Catalog Append Table]![Basic_Category]

Should the [Basic_Category] be the field name of the table or the name of
the Combo Box? As it is, it is the name of the Combo Box.

Klatuu said:
hmmmm, I thought I had copied from your post. You only need it one time:
Like [forms]![MyFormName]![Basic_Category]
jwinder said:
yes...one column. I was just doing what I thought you asked me to do...

you wrote: Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query -
Catalog Append Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]


:

Now you are up to 3 times. Is this all in the criteria for one column in the
query? It doesn't seem to make any sense.

:

seems llike I have something in there too many times... I now have the
following:
Like [forms]![Query - Catalog Append Table]![Basic_Category] &
[Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![Query - Catalog Append
Table]![Basic_Category]

When I run the Query (with no criteria in any of the fields) i get a pop up
box with the title "enter Parameter Value" and below that
"Forms!Query-Catalog Append" then a blank List Box.


:

Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
I'm curious as to why you have basiccategory in criteria twice. Try it like
this:
Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]

:

nope..didn't work. :-(

this what I entered:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
(When I saved it, it put in the extra Brackets around Me. and Basic_Category)

This is what I put into the other fields:
Like "*" & [Forms]![QueryFormName]![FieldName] & "*"

:

Refer to the value of the combo box in the query's criteria box

Me.MyCombo

:

New Problem: Is there a way to have the expression in the Query Criteria box
search for values in a pull down list in a Combo Box on the query Form?
I.E. say there are four values in the combo box pull down list ( Cat, Dog,
Fish, Bird). If one of those values is selected (Dog) via the pull down list,
what does the expression have to look like to search for the selected value
(Dog)?
 
J

jwinder

nope...doesn't work that way either.

Klatuu said:
Should be the name of the combo box. I wonder if because you are using LIKE,
it should be :

Like "'" & [Forms]![Query - Catalog Append Table]![Basic_Category] & "'"

jwinder said:
nope..still did not work. I now have
Like [Forms]![Query - Catalog Append Table]![Basic_Category]

Should the [Basic_Category] be the field name of the table or the name of
the Combo Box? As it is, it is the name of the Combo Box.

Klatuu said:
hmmmm, I thought I had copied from your post. You only need it one time:
Like [forms]![MyFormName]![Basic_Category]
:

yes...one column. I was just doing what I thought you asked me to do...

you wrote: Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query -
Catalog Append Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]


:

Now you are up to 3 times. Is this all in the criteria for one column in the
query? It doesn't seem to make any sense.

:

seems llike I have something in there too many times... I now have the
following:
Like [forms]![Query - Catalog Append Table]![Basic_Category] &
[Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![Query - Catalog Append
Table]![Basic_Category]

When I run the Query (with no criteria in any of the fields) i get a pop up
box with the title "enter Parameter Value" and below that
"Forms!Query-Catalog Append" then a blank List Box.


:

Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
I'm curious as to why you have basiccategory in criteria twice. Try it like
this:
Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]

:

nope..didn't work. :-(

this what I entered:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
(When I saved it, it put in the extra Brackets around Me. and Basic_Category)

This is what I put into the other fields:
Like "*" & [Forms]![QueryFormName]![FieldName] & "*"

:

Refer to the value of the combo box in the query's criteria box

Me.MyCombo

:

New Problem: Is there a way to have the expression in the Query Criteria box
search for values in a pull down list in a Combo Box on the query Form?
I.E. say there are four values in the combo box pull down list ( Cat, Dog,
Fish, Bird). If one of those values is selected (Dog) via the pull down list,
what does the expression have to look like to search for the selected value
(Dog)?
 
K

Klatuu

Okay, I had to go back and dig out an app I did 6 yrs ago and found the right
syntax. Mine is this:
Like [Forms]![frmClientSearch]![txtLastName] & "*"

So your's should be like this:
Like [Forms]![Query - Catalog Append Table]![Basic_Category] & "*"
jwinder said:
nope...doesn't work that way either.

Klatuu said:
Should be the name of the combo box. I wonder if because you are using LIKE,
it should be :

Like "'" & [Forms]![Query - Catalog Append Table]![Basic_Category] & "'"

jwinder said:
nope..still did not work. I now have
Like [Forms]![Query - Catalog Append Table]![Basic_Category]

Should the [Basic_Category] be the field name of the table or the name of
the Combo Box? As it is, it is the name of the Combo Box.

:

hmmmm, I thought I had copied from your post. You only need it one time:
Like [forms]![MyFormName]![Basic_Category]
:

yes...one column. I was just doing what I thought you asked me to do...

you wrote: Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query -
Catalog Append Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]


:

Now you are up to 3 times. Is this all in the criteria for one column in the
query? It doesn't seem to make any sense.

:

seems llike I have something in there too many times... I now have the
following:
Like [forms]![Query - Catalog Append Table]![Basic_Category] &
[Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![Query - Catalog Append
Table]![Basic_Category]

When I run the Query (with no criteria in any of the fields) i get a pop up
box with the title "enter Parameter Value" and below that
"Forms!Query-Catalog Append" then a blank List Box.


:

Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
I'm curious as to why you have basiccategory in criteria twice. Try it like
this:
Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]

:

nope..didn't work. :-(

this what I entered:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
(When I saved it, it put in the extra Brackets around Me. and Basic_Category)

This is what I put into the other fields:
Like "*" & [Forms]![QueryFormName]![FieldName] & "*"

:

Refer to the value of the combo box in the query's criteria box

Me.MyCombo

:

New Problem: Is there a way to have the expression in the Query Criteria box
search for values in a pull down list in a Combo Box on the query Form?
I.E. say there are four values in the combo box pull down list ( Cat, Dog,
Fish, Bird). If one of those values is selected (Dog) via the pull down list,
what does the expression have to look like to search for the selected value
(Dog)?
 
J

jwinder

well..that works better....but it is getting ALL records...no matter what
Field Name I select from the "Basic Category" drop down list

Klatuu said:
Okay, I had to go back and dig out an app I did 6 yrs ago and found the right
syntax. Mine is this:
Like [Forms]![frmClientSearch]![txtLastName] & "*"

So your's should be like this:
Like [Forms]![Query - Catalog Append Table]![Basic_Category] & "*"
jwinder said:
nope...doesn't work that way either.

Klatuu said:
Should be the name of the combo box. I wonder if because you are using LIKE,
it should be :

Like "'" & [Forms]![Query - Catalog Append Table]![Basic_Category] & "'"

:

nope..still did not work. I now have
Like [Forms]![Query - Catalog Append Table]![Basic_Category]

Should the [Basic_Category] be the field name of the table or the name of
the Combo Box? As it is, it is the name of the Combo Box.

:

hmmmm, I thought I had copied from your post. You only need it one time:
Like [forms]![MyFormName]![Basic_Category]
:

yes...one column. I was just doing what I thought you asked me to do...

you wrote: Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query -
Catalog Append Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]


:

Now you are up to 3 times. Is this all in the criteria for one column in the
query? It doesn't seem to make any sense.

:

seems llike I have something in there too many times... I now have the
following:
Like [forms]![Query - Catalog Append Table]![Basic_Category] &
[Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![Query - Catalog Append
Table]![Basic_Category]

When I run the Query (with no criteria in any of the fields) i get a pop up
box with the title "enter Parameter Value" and below that
"Forms!Query-Catalog Append" then a blank List Box.


:

Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
I'm curious as to why you have basiccategory in criteria twice. Try it like
this:
Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]

:

nope..didn't work. :-(

this what I entered:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
(When I saved it, it put in the extra Brackets around Me. and Basic_Category)

This is what I put into the other fields:
Like "*" & [Forms]![QueryFormName]![FieldName] & "*"

:

Refer to the value of the combo box in the query's criteria box

Me.MyCombo

:

New Problem: Is there a way to have the expression in the Query Criteria box
search for values in a pull down list in a Combo Box on the query Form?
I.E. say there are four values in the combo box pull down list ( Cat, Dog,
Fish, Bird). If one of those values is selected (Dog) via the pull down list,
what does the expression have to look like to search for the selected value
(Dog)?
 
R

ryan_eng

I have a similar problem to jwinder.
I have a subform with 3 combo boxes that have to be all related. The first
one is Task_ID, a combo box that grabs a list from another table. The second
is Act_Type, which is just a list I enterred manually. The third is Act_ID,
which is based on a query and needs to be filtered using the values of the
previous two combo boxes. I tried using the expression Klatuu dug up but its
not working. I still get the "enter parameter value" dialog box with the
expression shown.

I really need this to work, pleeeeeease help me.

RYAN


Klatuu said:
Okay, I had to go back and dig out an app I did 6 yrs ago and found the right
syntax. Mine is this:
Like [Forms]![frmClientSearch]![txtLastName] & "*"

So your's should be like this:
Like [Forms]![Query - Catalog Append Table]![Basic_Category] & "*"
jwinder said:
nope...doesn't work that way either.

Klatuu said:
Should be the name of the combo box. I wonder if because you are using LIKE,
it should be :

Like "'" & [Forms]![Query - Catalog Append Table]![Basic_Category] & "'"

:

nope..still did not work. I now have
Like [Forms]![Query - Catalog Append Table]![Basic_Category]

Should the [Basic_Category] be the field name of the table or the name of
the Combo Box? As it is, it is the name of the Combo Box.

:

hmmmm, I thought I had copied from your post. You only need it one time:
Like [forms]![MyFormName]![Basic_Category]
:

yes...one column. I was just doing what I thought you asked me to do...

you wrote: Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query -
Catalog Append Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]


:

Now you are up to 3 times. Is this all in the criteria for one column in the
query? It doesn't seem to make any sense.

:

seems llike I have something in there too many times... I now have the
following:
Like [forms]![Query - Catalog Append Table]![Basic_Category] &
[Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![Query - Catalog Append
Table]![Basic_Category]

When I run the Query (with no criteria in any of the fields) i get a pop up
box with the title "enter Parameter Value" and below that
"Forms!Query-Catalog Append" then a blank List Box.


:

Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
I'm curious as to why you have basiccategory in criteria twice. Try it like
this:
Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]

:

nope..didn't work. :-(

this what I entered:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
(When I saved it, it put in the extra Brackets around Me. and Basic_Category)

This is what I put into the other fields:
Like "*" & [Forms]![QueryFormName]![FieldName] & "*"

:

Refer to the value of the combo box in the query's criteria box

Me.MyCombo

:

New Problem: Is there a way to have the expression in the Query Criteria box
search for values in a pull down list in a Combo Box on the query Form?
I.E. say there are four values in the combo box pull down list ( Cat, Dog,
Fish, Bird). If one of those values is selected (Dog) via the pull down list,
what does the expression have to look like to search for the selected value
(Dog)?
 
K

Klatuu

I was concerned about the LIKE. If you are looking for a specific category,
this should do it:
[Forms]![Query - Catalog Append Table]![Basic_Category]

jwinder said:
well..that works better....but it is getting ALL records...no matter what
Field Name I select from the "Basic Category" drop down list

Klatuu said:
Okay, I had to go back and dig out an app I did 6 yrs ago and found the right
syntax. Mine is this:
Like [Forms]![frmClientSearch]![txtLastName] & "*"

So your's should be like this:
Like [Forms]![Query - Catalog Append Table]![Basic_Category] & "*"
jwinder said:
nope...doesn't work that way either.

:

Should be the name of the combo box. I wonder if because you are using LIKE,
it should be :

Like "'" & [Forms]![Query - Catalog Append Table]![Basic_Category] & "'"

:

nope..still did not work. I now have
Like [Forms]![Query - Catalog Append Table]![Basic_Category]

Should the [Basic_Category] be the field name of the table or the name of
the Combo Box? As it is, it is the name of the Combo Box.

:

hmmmm, I thought I had copied from your post. You only need it one time:
Like [forms]![MyFormName]![Basic_Category]
:

yes...one column. I was just doing what I thought you asked me to do...

you wrote: Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query -
Catalog Append Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]


:

Now you are up to 3 times. Is this all in the criteria for one column in the
query? It doesn't seem to make any sense.

:

seems llike I have something in there too many times... I now have the
following:
Like [forms]![Query - Catalog Append Table]![Basic_Category] &
[Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![Query - Catalog Append
Table]![Basic_Category]

When I run the Query (with no criteria in any of the fields) i get a pop up
box with the title "enter Parameter Value" and below that
"Forms!Query-Catalog Append" then a blank List Box.


:

Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
I'm curious as to why you have basiccategory in criteria twice. Try it like
this:
Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]

:

nope..didn't work. :-(

this what I entered:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
(When I saved it, it put in the extra Brackets around Me. and Basic_Category)

This is what I put into the other fields:
Like "*" & [Forms]![QueryFormName]![FieldName] & "*"

:

Refer to the value of the combo box in the query's criteria box

Me.MyCombo

:

New Problem: Is there a way to have the expression in the Query Criteria box
search for values in a pull down list in a Combo Box on the query Form?
I.E. say there are four values in the combo box pull down list ( Cat, Dog,
Fish, Bird). If one of those values is selected (Dog) via the pull down list,
what does the expression have to look like to search for the selected value
(Dog)?
 
J

jwinder

nope...

Now I am back to getting a "Enter Paremeter Value" message box...

Klatuu said:
I was concerned about the LIKE. If you are looking for a specific category,
this should do it:
[Forms]![Query - Catalog Append Table]![Basic_Category]

jwinder said:
well..that works better....but it is getting ALL records...no matter what
Field Name I select from the "Basic Category" drop down list

Klatuu said:
Okay, I had to go back and dig out an app I did 6 yrs ago and found the right
syntax. Mine is this:
Like [Forms]![frmClientSearch]![txtLastName] & "*"

So your's should be like this:
Like [Forms]![Query - Catalog Append Table]![Basic_Category] & "*"
:

nope...doesn't work that way either.

:

Should be the name of the combo box. I wonder if because you are using LIKE,
it should be :

Like "'" & [Forms]![Query - Catalog Append Table]![Basic_Category] & "'"

:

nope..still did not work. I now have
Like [Forms]![Query - Catalog Append Table]![Basic_Category]

Should the [Basic_Category] be the field name of the table or the name of
the Combo Box? As it is, it is the name of the Combo Box.

:

hmmmm, I thought I had copied from your post. You only need it one time:
Like [forms]![MyFormName]![Basic_Category]
:

yes...one column. I was just doing what I thought you asked me to do...

you wrote: Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query -
Catalog Append Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]


:

Now you are up to 3 times. Is this all in the criteria for one column in the
query? It doesn't seem to make any sense.

:

seems llike I have something in there too many times... I now have the
following:
Like [forms]![Query - Catalog Append Table]![Basic_Category] &
[Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![Query - Catalog Append
Table]![Basic_Category]

When I run the Query (with no criteria in any of the fields) i get a pop up
box with the title "enter Parameter Value" and below that
"Forms!Query-Catalog Append" then a blank List Box.


:

Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
I'm curious as to why you have basiccategory in criteria twice. Try it like
this:
Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]

:

nope..didn't work. :-(

this what I entered:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
(When I saved it, it put in the extra Brackets around Me. and Basic_Category)

This is what I put into the other fields:
Like "*" & [Forms]![QueryFormName]![FieldName] & "*"

:

Refer to the value of the combo box in the query's criteria box

Me.MyCombo

:

New Problem: Is there a way to have the expression in the Query Criteria box
search for values in a pull down list in a Combo Box on the query Form?
I.E. say there are four values in the combo box pull down list ( Cat, Dog,
Fish, Bird). If one of those values is selected (Dog) via the pull down list,
what does the expression have to look like to search for the selected value
(Dog)?
 
J

jwinder

well..if I type in one of the values from the drop down list in the "enter
Parameter Value" message box it does work. Anyway to make it work by just
selecting a value from the drop down list without this additional message
box...

Klatuu said:
I was concerned about the LIKE. If you are looking for a specific category,
this should do it:
[Forms]![Query - Catalog Append Table]![Basic_Category]

jwinder said:
well..that works better....but it is getting ALL records...no matter what
Field Name I select from the "Basic Category" drop down list

Klatuu said:
Okay, I had to go back and dig out an app I did 6 yrs ago and found the right
syntax. Mine is this:
Like [Forms]![frmClientSearch]![txtLastName] & "*"

So your's should be like this:
Like [Forms]![Query - Catalog Append Table]![Basic_Category] & "*"
:

nope...doesn't work that way either.

:

Should be the name of the combo box. I wonder if because you are using LIKE,
it should be :

Like "'" & [Forms]![Query - Catalog Append Table]![Basic_Category] & "'"

:

nope..still did not work. I now have
Like [Forms]![Query - Catalog Append Table]![Basic_Category]

Should the [Basic_Category] be the field name of the table or the name of
the Combo Box? As it is, it is the name of the Combo Box.

:

hmmmm, I thought I had copied from your post. You only need it one time:
Like [forms]![MyFormName]![Basic_Category]
:

yes...one column. I was just doing what I thought you asked me to do...

you wrote: Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query -
Catalog Append Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]


:

Now you are up to 3 times. Is this all in the criteria for one column in the
query? It doesn't seem to make any sense.

:

seems llike I have something in there too many times... I now have the
following:
Like [forms]![Query - Catalog Append Table]![Basic_Category] &
[Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![Query - Catalog Append
Table]![Basic_Category]

When I run the Query (with no criteria in any of the fields) i get a pop up
box with the title "enter Parameter Value" and below that
"Forms!Query-Catalog Append" then a blank List Box.


:

Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
I'm curious as to why you have basiccategory in criteria twice. Try it like
this:
Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]

:

nope..didn't work. :-(

this what I entered:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
(When I saved it, it put in the extra Brackets around Me. and Basic_Category)

This is what I put into the other fields:
Like "*" & [Forms]![QueryFormName]![FieldName] & "*"

:

Refer to the value of the combo box in the query's criteria box

Me.MyCombo

:

New Problem: Is there a way to have the expression in the Query Criteria box
search for values in a pull down list in a Combo Box on the query Form?
I.E. say there are four values in the combo box pull down list ( Cat, Dog,
Fish, Bird). If one of those values is selected (Dog) via the pull down list,
what does the expression have to look like to search for the selected value
(Dog)?
 
J

jwinder

Sorry...I copied and pasted some erroneuos info. It does nothing...no
records, no "message boxes"....

Klatuu said:
I was concerned about the LIKE. If you are looking for a specific category,
this should do it:
[Forms]![Query - Catalog Append Table]![Basic_Category]

jwinder said:
well..that works better....but it is getting ALL records...no matter what
Field Name I select from the "Basic Category" drop down list

Klatuu said:
Okay, I had to go back and dig out an app I did 6 yrs ago and found the right
syntax. Mine is this:
Like [Forms]![frmClientSearch]![txtLastName] & "*"

So your's should be like this:
Like [Forms]![Query - Catalog Append Table]![Basic_Category] & "*"
:

nope...doesn't work that way either.

:

Should be the name of the combo box. I wonder if because you are using LIKE,
it should be :

Like "'" & [Forms]![Query - Catalog Append Table]![Basic_Category] & "'"

:

nope..still did not work. I now have
Like [Forms]![Query - Catalog Append Table]![Basic_Category]

Should the [Basic_Category] be the field name of the table or the name of
the Combo Box? As it is, it is the name of the Combo Box.

:

hmmmm, I thought I had copied from your post. You only need it one time:
Like [forms]![MyFormName]![Basic_Category]
:

yes...one column. I was just doing what I thought you asked me to do...

you wrote: Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query -
Catalog Append Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]


:

Now you are up to 3 times. Is this all in the criteria for one column in the
query? It doesn't seem to make any sense.

:

seems llike I have something in there too many times... I now have the
following:
Like [forms]![Query - Catalog Append Table]![Basic_Category] &
[Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![Query - Catalog Append
Table]![Basic_Category]

When I run the Query (with no criteria in any of the fields) i get a pop up
box with the title "enter Parameter Value" and below that
"Forms!Query-Catalog Append" then a blank List Box.


:

Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
I'm curious as to why you have basiccategory in criteria twice. Try it like
this:
Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]

:

nope..didn't work. :-(

this what I entered:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
(When I saved it, it put in the extra Brackets around Me. and Basic_Category)

This is what I put into the other fields:
Like "*" & [Forms]![QueryFormName]![FieldName] & "*"

:

Refer to the value of the combo box in the query's criteria box

Me.MyCombo

:

New Problem: Is there a way to have the expression in the Query Criteria box
search for values in a pull down list in a Combo Box on the query Form?
I.E. say there are four values in the combo box pull down list ( Cat, Dog,
Fish, Bird). If one of those values is selected (Dog) via the pull down list,
what does the expression have to look like to search for the selected value
(Dog)?
 
K

Klatuu

Without the objects in front of me, I can't tell. I know the examples I sent
work, because I use both versions.

ryan_eng said:
I have a similar problem to jwinder.
I have a subform with 3 combo boxes that have to be all related. The first
one is Task_ID, a combo box that grabs a list from another table. The second
is Act_Type, which is just a list I enterred manually. The third is Act_ID,
which is based on a query and needs to be filtered using the values of the
previous two combo boxes. I tried using the expression Klatuu dug up but its
not working. I still get the "enter parameter value" dialog box with the
expression shown.

I really need this to work, pleeeeeease help me.

RYAN


Klatuu said:
Okay, I had to go back and dig out an app I did 6 yrs ago and found the right
syntax. Mine is this:
Like [Forms]![frmClientSearch]![txtLastName] & "*"

So your's should be like this:
Like [Forms]![Query - Catalog Append Table]![Basic_Category] & "*"
jwinder said:
nope...doesn't work that way either.

:

Should be the name of the combo box. I wonder if because you are using LIKE,
it should be :

Like "'" & [Forms]![Query - Catalog Append Table]![Basic_Category] & "'"

:

nope..still did not work. I now have
Like [Forms]![Query - Catalog Append Table]![Basic_Category]

Should the [Basic_Category] be the field name of the table or the name of
the Combo Box? As it is, it is the name of the Combo Box.

:

hmmmm, I thought I had copied from your post. You only need it one time:
Like [forms]![MyFormName]![Basic_Category]
:

yes...one column. I was just doing what I thought you asked me to do...

you wrote: Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query -
Catalog Append Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]


:

Now you are up to 3 times. Is this all in the criteria for one column in the
query? It doesn't seem to make any sense.

:

seems llike I have something in there too many times... I now have the
following:
Like [forms]![Query - Catalog Append Table]![Basic_Category] &
[Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![Query - Catalog Append
Table]![Basic_Category]

When I run the Query (with no criteria in any of the fields) i get a pop up
box with the title "enter Parameter Value" and below that
"Forms!Query-Catalog Append" then a blank List Box.


:

Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
I'm curious as to why you have basiccategory in criteria twice. Try it like
this:
Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]

:

nope..didn't work. :-(

this what I entered:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
(When I saved it, it put in the extra Brackets around Me. and Basic_Category)

This is what I put into the other fields:
Like "*" & [Forms]![QueryFormName]![FieldName] & "*"

:

Refer to the value of the combo box in the query's criteria box

Me.MyCombo

:

New Problem: Is there a way to have the expression in the Query Criteria box
search for values in a pull down list in a Combo Box on the query Form?
I.E. say there are four values in the combo box pull down list ( Cat, Dog,
Fish, Bird). If one of those values is selected (Dog) via the pull down list,
what does the expression have to look like to search for the selected value
(Dog)?
 
J

jwinder

anyway I can send them to you?

Klatuu said:
Without the objects in front of me, I can't tell. I know the examples I sent
work, because I use both versions.

ryan_eng said:
I have a similar problem to jwinder.
I have a subform with 3 combo boxes that have to be all related. The first
one is Task_ID, a combo box that grabs a list from another table. The second
is Act_Type, which is just a list I enterred manually. The third is Act_ID,
which is based on a query and needs to be filtered using the values of the
previous two combo boxes. I tried using the expression Klatuu dug up but its
not working. I still get the "enter parameter value" dialog box with the
expression shown.

I really need this to work, pleeeeeease help me.

RYAN


Klatuu said:
Okay, I had to go back and dig out an app I did 6 yrs ago and found the right
syntax. Mine is this:
Like [Forms]![frmClientSearch]![txtLastName] & "*"

So your's should be like this:
Like [Forms]![Query - Catalog Append Table]![Basic_Category] & "*"
:

nope...doesn't work that way either.

:

Should be the name of the combo box. I wonder if because you are using LIKE,
it should be :

Like "'" & [Forms]![Query - Catalog Append Table]![Basic_Category] & "'"

:

nope..still did not work. I now have
Like [Forms]![Query - Catalog Append Table]![Basic_Category]

Should the [Basic_Category] be the field name of the table or the name of
the Combo Box? As it is, it is the name of the Combo Box.

:

hmmmm, I thought I had copied from your post. You only need it one time:
Like [forms]![MyFormName]![Basic_Category]
:

yes...one column. I was just doing what I thought you asked me to do...

you wrote: Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query -
Catalog Append Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]


:

Now you are up to 3 times. Is this all in the criteria for one column in the
query? It doesn't seem to make any sense.

:

seems llike I have something in there too many times... I now have the
following:
Like [forms]![Query - Catalog Append Table]![Basic_Category] &
[Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![Query - Catalog Append
Table]![Basic_Category]

When I run the Query (with no criteria in any of the fields) i get a pop up
box with the title "enter Parameter Value" and below that
"Forms!Query-Catalog Append" then a blank List Box.


:

Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
I'm curious as to why you have basiccategory in criteria twice. Try it like
this:
Like [forms]![MyFormName]![Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [forms]![MyFormName]![Basic_Category]

:

nope..didn't work. :-(

this what I entered:
Like [Me].[Basic_Category] & [Forms]![Query - Catalog Append
Table]![BasicCategory] & [Me].[Basic_Category]
(When I saved it, it put in the extra Brackets around Me. and Basic_Category)

This is what I put into the other fields:
Like "*" & [Forms]![QueryFormName]![FieldName] & "*"

:

Refer to the value of the combo box in the query's criteria box

Me.MyCombo

:

New Problem: Is there a way to have the expression in the Query Criteria box
search for values in a pull down list in a Combo Box on the query Form?
I.E. say there are four values in the combo box pull down list ( Cat, Dog,
Fish, Bird). If one of those values is selected (Dog) via the pull down list,
what does the expression have to look like to search for the selected value
(Dog)?
 

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