By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,041 Members | 1,793 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,041 IT Pros & Developers. It's quick & easy.

criteria that with a value containing an asterisk

P: n/a
I'm working with a form & a query that allows the user to filter the
data using several combo boxes. One of the combo boxes allows them to
select the first letter of a a particular field, and it will use that
first letter in the criteria of the query to include only records with
a value beginning with that letter. The tricky part is that one of the
possible values for that field is - *.* - not values I would have
chosen, but they are coming from another system, so I have no control
over it. If you select the * value, it ends up returning all of the
records. Is there any way I can still use this setup, and still filter
for records beginning with an asterisk? I tried enclosing the asterisk
in quotes, but it doesn't return any values. i'm stumped - any
suggestions?
Aug 4 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Mon, 4 Aug 2008 05:02:50 -0700 (PDT), Coll wrote:
I'm working with a form & a query that allows the user to filter the
data using several combo boxes. One of the combo boxes allows them to
select the first letter of a a particular field, and it will use that
first letter in the criteria of the query to include only records with
a value beginning with that letter. The tricky part is that one of the
possible values for that field is - *.* - not values I would have
chosen, but they are coming from another system, so I have no control
over it. If you select the * value, it ends up returning all of the
records. Is there any way I can still use this setup, and still filter
for records beginning with an asterisk? I tried enclosing the asterisk
in quotes, but it doesn't return any values. i'm stumped - any
suggestions?
For just a leading asterisk, place the * within brackets.

Like "[*]" & "*"

For the *,* combination, use:
Like "[*]" & "," & "[*]" & "*"
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Aug 4 '08 #2

P: n/a
On Aug 4, 10:46*am, fredg <fgutk...@example.invalidwrote:
On Mon, 4 Aug 2008 05:02:50 -0700 (PDT), Coll wrote:
I'm working with a form & a query that allows the user to filter the
data using several combo boxes. One of the combo boxes allows them to
select the first letter of a a particular field, and it will use that
first letter in the criteria of the query to include only records with
a value beginning with that letter. The tricky part is that one of the
possible values for that field is - *.* - not values I would have
chosen, but they are coming from another system, so I have no control
over it. If you select the * value, it ends up returning all of the
records. Is there any way I can still use this setup, and still filter
for records beginning with an asterisk? I tried enclosing the asterisk
in quotes, but it doesn't return any values. i'm stumped - any
suggestions?

For just a leading asterisk, place the * within brackets.

Like "[*]" & "*"

For the *,* combination, use:
Like "[*]" & "," & "[*]" & "*"
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Works great - thank so much!!
Aug 4 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.