use wildcard with parameter?

E

el zorro

I have a query that reads a parameter from a form. For
ex, if the user input the language "Bosnian" on the
People form, the Query shows all records with "Bosnian"
in the Language field. This happens because the query
contains a parameter [Forms]![People]![Language] for the
Language field. So far so good.

In some cases, the Language field contains more than one
language, like Arabic or Croatian. In these cases, the
person is not listed, but they should be. I tried
modifying the parameter to: Like "*[Forms]![People]!
[Language]*", but no dice.

Is there a way to allow the query to read the language
from the form, and show all records that contain that
language (in addition to other languages) in the language
field?

THanks!
 
J

John Vinson

I have a query that reads a parameter from a form. For
ex, if the user input the language "Bosnian" on the
People form, the Query shows all records with "Bosnian"
in the Language field. This happens because the query
contains a parameter [Forms]![People]![Language] for the
Language field. So far so good.

In some cases, the Language field contains more than one
language, like Arabic or Croatian. In these cases, the
person is not listed, but they should be. I tried
modifying the parameter to: Like "*[Forms]![People]!
[Language]*", but no dice.

You're very close:

LIKE "*" & [Forms]![People]![Language] & "*"

John W. Vinson[MVP]
 
E

el zorro

Perfect! Thanks to both of you!
-----Original Message-----
What about:
Like "*" & [Forms]![People]![Language] & "*"

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe? SUBED1=ACCESS-L

I have a query that reads a parameter from a form. For
ex, if the user input the language "Bosnian" on the
People form, the Query shows all records with "Bosnian"
in the Language field. This happens because the query
contains a parameter [Forms]![People]![Language] for the
Language field. So far so good.

In some cases, the Language field contains more than one
language, like Arabic or Croatian. In these cases, the
person is not listed, but they should be. I tried
modifying the parameter to: Like "*[Forms]![People]!
[Language]*", but no dice.

Is there a way to allow the query to read the language
from the form, and show all records that contain that
language (in addition to other languages) in the language
field?

THanks!


.
 

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