Ask the Expert

Having problems selecting multiple values from a drop-down field to search my DB

I am having some difficulties with a customized Web search that I am doing. I have everything working to be able to select specific values from six drop-down fields to search my database. For example: field=Region and the user can select NA, LA, EU or AP. It works fine for just selecting NA, but I cannot get it to work when selecting multiple values like NA and LA.
You need to look at the formula you use for creating your query expression. I expect you're doing something like:

... + "([Region] = " + fldRegion + ")" + ...

If fldRegion is multi-valued, this results in a mess -- a multi-valued result, when you need a single-valued string as your query. You would have to instead write something like:

... + "([Region] = ("" + @Implode(fldRegion; "" or "") + "")" + ...

This was first published in June 2003

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: