Using Dropdown in from to change query criteria

huntersoasis

New Member
Joined
Jun 9, 2015
Messages
7
I currently have a dropdown in place on from to change criteria of the query Everything is working fine and in the query it shows

Code:
[Forms]![PRODUCTS_FORM]![category_select]

everything works great except this field is not all that the select is... I need something to find any matches in field like

Code:
Like "*[category_select]*"

but anyway i try it it does not work.

any suggesting to get the dropdown to put in the query the Like "* and *"

Thanks,
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
none of these work

Code:
Like "*[COLOR=#333333][Forms]![PRODUCTS_FORM]![category_select]*"[/COLOR]

Code:
Like "* & [COLOR=#333333][Forms]![PRODUCTS_FORM]![category_select] & *"[/COLOR]

I have even gone as far to make a table with the option and included

Code:
Like "*Accessories*"

from the original option of just

Code:
Accessories

And still no luck
 
Last edited:
Upvote 0
I would have recommended this: Like "*" & [Forms]![PRODUCTS_FORM].[category_select]) & "*" as I don't believe in using arithmetic operators on text.
Note that I replaced the second ! also. I guess you have more in the sql that comes after because you say it works yet you have no semi-colon at the end.
 
Upvote 0

Forum statistics

Threads
1,221,849
Messages
6,162,425
Members
451,765
Latest member
craigvan888

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top