Hi all,
I am wondering if anyone out there knows why the wild card (*) will not work
in an MS Access 2010 query.
I tried, as I have for years, to enter a criteria in a query as follows:
Like "*" & [Forms]![FormName]![FieldName] & "*"
And it creates this
ALike "*" & [Forms]![FormName]![FieldName] & "*" and then won't work
Please help someone as I am at my wits end.
Thanks in advance
JayTee
|
|
0
|
|
|
|
Reply
|
JayTee
|
5/26/2010 11:42:52 PM |
|
Depending on how you're using it, you may need to use % as the wildcard, not
*.
--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/djsteele
Co-author: Access 2010 Solutions, published by Wiley
(no e-mails, please!)
"JayTee" <jtennyen@bigpond.net.au> wrote in message
news:0miLn.27375$pv.13213@news-server.bigpond.net.au...
> Hi all,
> I am wondering if anyone out there knows why the wild card (*) will not
> work in an MS Access 2010 query.
>
> I tried, as I have for years, to enter a criteria in a query as follows:
> Like "*" & [Forms]![FormName]![FieldName] & "*"
> And it creates this
> ALike "*" & [Forms]![FormName]![FieldName] & "*" and then won't work
> Please help someone as I am at my wits end.
> Thanks in advance
>
> JayTee
>
|
|
0
|
|
|
|
Reply
|
Douglas
|
5/27/2010 12:52:55 AM
|
|
On Wed, 26 May 2010 23:42:52 GMT, "JayTee" <jtennyen@bigpond.net.au> wrote:
>Hi all,
>I am wondering if anyone out there knows why the wild card (*) will not work
>in an MS Access 2010 query.
>
>I tried, as I have for years, to enter a criteria in a query as follows:
>Like "*" & [Forms]![FormName]![FieldName] & "*"
>And it creates this
>ALike "*" & [Forms]![FormName]![FieldName] & "*" and then won't work
>Please help someone as I am at my wits end.
>Thanks in advance
>
>JayTee
>
Sounds like you've set the database's properties to use SQL/92 format queries
(not sure just how it phrases it). The ALike is the clue. ALike is equivalent
to the SQL/Server syntax of LIKE, and uses % rather than * as the "match any
string" wildcared (also it uses _ rather than ? as the match a single
character). See the online Help for "ALIKE".
--
John W. Vinson [MVP]
|
|
0
|
|
|
|
Reply
|
John
|
5/27/2010 1:42:48 AM
|
|
"JayTee" <jtennyen@bigpond.net.au> wrote in
news:0miLn.27375$pv.13213@news-server.bigpond.net.au:
> I am wondering if anyone out there knows why the wild card (*)
> will not work in an MS Access 2010 query.
>
> I tried, as I have for years, to enter a criteria in a query as
> follows: Like "*" & [Forms]![FormName]![FieldName] & "*"
> And it creates this
> ALike "*" & [Forms]![FormName]![FieldName] & "*" and then won't
> work Please help someone as I am at my wits end.
> Thanks in advance
Because you're using ALIKE instead of LIKE. ALIKE exists to allow
you to use SQL Server compatible wildcards, in which case you'd use
% in place of * and _ in place of ?.
--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
|
|
0
|
|
|
|
Reply
|
David
|
5/27/2010 5:26:33 PM
|
|
John W. Vinson <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in
news:bdjrv5101refd18d63uk2d39otdt7d4k1d@4ax.com:
> On Wed, 26 May 2010 23:42:52 GMT, "JayTee"
> <jtennyen@bigpond.net.au> wrote:
>
>>Hi all,
>>I am wondering if anyone out there knows why the wild card (*)
>>will not work in an MS Access 2010 query.
>>
>>I tried, as I have for years, to enter a criteria in a query as
>>follows: Like "*" & [Forms]![FormName]![FieldName] & "*"
>>And it creates this
>>ALike "*" & [Forms]![FormName]![FieldName] & "*" and then won't
>>work Please help someone as I am at my wits end.
>
> Sounds like you've set the database's properties to use SQL/92
> format queries (not sure just how it phrases it). The ALike is the
> clue. ALike is equivalent to the SQL/Server syntax of LIKE, and
> uses % rather than * as the "match any string" wildcared (also it
> uses _ rather than ? as the match a single character). See the
> online Help for "ALIKE".
ALIKE works even when you don't have SQL 92 mode turned on.
I've never quite figured out what purpose it serves, to be honest,
as all it does is allow you to use the SQL Server-compatible
wildcards. I don't know if it's compatible with other SQL dialects.
--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
|
|
0
|
|
|
|
Reply
|
David
|
5/27/2010 5:28:31 PM
|
|
|
4 Replies
953 Views
(page loaded in 0.159 seconds)
Similiar Articles: Wild card not working in Access 2010 query - microsoft.public ...Hi all, I am wondering if anyone out there knows why the wild card (*) will not work in an MS Access 2010 query. I tried, as I have for years, t... Left Join query not working in Access 2010 - microsoft.public ...Wild card not working in Access 2010 query - microsoft.public ... Left Join query not working in Access 2010 - microsoft.public ... Wild card not working in Access 2010 ... Not Like - not working in query criteria - microsoft.public.access ...... want to se CLEAR and CLEAN then Not Like "CL*" would work. Notice the * wild card. ... is not working - microsoft.public.access ... Not Like - not working in query ... Access 2007 Will not accept wildcard - microsoft.public.access ...Wild card not working in Access 2010 query - microsoft.public ... Access 2007 Will not accept wildcard - microsoft.public.access ... Wild card not working in Access 2010 ... Query wildcard symbols - microsoft.public.access.queries ...Wild card not working in Access 2010 query - microsoft.public ... Wild card not working in Access 2010 query - microsoft.public ... Wild card not working in Access 2010 ... How to get query to return total using wildcard - microsoft.public ...How to get query to return total using wildcard - microsoft.public ... Currently the results then are based ... Wild card not working in Access 2010 query - microsoft ... Strange query results/Wild characters??? - microsoft.public.access ...Wild card not working in Access 2010 query - microsoft.public ... Strange query results/Wild characters??? - microsoft.public.access ... How to get query to return total ... looking for the Access equivalent of the CASE WHEN SQL Server ...Wild card not working in Access 2010 query - microsoft.public ... looking for the Access equivalent of the CASE WHEN SQL Server ... Wild card not working in Access 2010 ... not like syntax in querry not working - microsoft.public.excel ...... 3/10/2010 4:25:01 PM ... LIKE operator not working with MS Access SQL Queries - Dev Articles LIKE ... Like with variable and wild card character joining two iif statements - microsoft.public.access.queries ...Try > >Switch(([cert master]!Verbiage Like "*Best Buy Gift Card*" ,0 ... joining two iif statements - microsoft.public.access.queries ..... not working in Access 2010 query ... Re: Wild card not working in Access 2010 queryDepending on how you're using it, you may need to use % as the wildcard, not *. -- Doug Steele, Microsoft Access MVP http://www.AccessMVP.com/djsteele Co-author ... Wild card not working in Access 2010 query - microsoft.public ...Hi all, I am wondering if anyone out there knows why the wild card (*) will not work in an MS Access 2010 query. I tried, as I have for years, t... Wild card not working in Access 2010 query [Form]Hi all, I am wondering if anyone out there knows why the wild card (*) will not work in an MS Access 2010 query. I tried, as I have for years, to enter a criteria in ... Using Wild Card Entries In Access 2010 - How-To GeekUsing Wild Card Entries In Access 2010 ... On the other hand, Access weighing GUI interface, provides Wild Card ... But when I query using “not like” it ... Wild card not working in Access 2010 queryHi all, I am wondering if anyone out there knows why the wild card (*) will not work in an MS Access 2010 query. I tried, as I have for years, to 7/23/2012 6:33:00 PM
|