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)?