A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Access 2007 Will not accept wildcard



 
 
Thread Tools Display Modes
  #1  
Old May 6th, 2010, 08:10 PM posted to microsoft.public.access.queries
Rita Brasher[_2_]
external usenet poster
 
Posts: 20
Default Access 2007 Will not accept wildcard

I have a query and in the criteria for a text field (Route), I'm placing
the following statement:

Like "*433"



When executed, the query will not return any rows. However, if I type
in each option (IE433, X433, etc.) and execute each one, results are
returned.

I had another query where I used this with no issue.
Any ideas as to what the problem may be?

Thanks,
Rita Brasher
  #2  
Old May 6th, 2010, 08:43 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default Access 2007 Will not accept wildcard

It could be that you have checked use ANSI compliant SQL. If so the wild card
is a % sign. Try using
Like '%433'
and see if that works

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

Rita Brasher wrote:
I have a query and in the criteria for a text field (Route), I'm placing
the following statement:

Like "*433"



When executed, the query will not return any rows. However, if I type
in each option (IE433, X433, etc.) and execute each one, results are
returned.

I had another query where I used this with no issue.
Any ideas as to what the problem may be?

Thanks,
Rita Brasher

  #3  
Old May 6th, 2010, 09:10 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Access 2007 Will not accept wildcard

Do you have any formating on the field?

Post the SQL of your query.

--
Build a little, test a little.


"Rita Brasher" wrote:

I have a query and in the criteria for a text field (Route), I'm placing
the following statement:

Like "*433"



When executed, the query will not return any rows. However, if I type
in each option (IE433, X433, etc.) and execute each one, results are
returned.

I had another query where I used this with no issue.
Any ideas as to what the problem may be?

Thanks,
Rita Brasher
.

  #4  
Old May 11th, 2010, 04:01 PM posted to microsoft.public.access.queries
Rita Brasher[_2_]
external usenet poster
 
Posts: 20
Default Access 2007 Will not accept wildcard

Here's the SQL:

SELECT DISTINCT [Monthly Shortages].ARRIVAL_WORK_DT, [Monthly
Shortages].AIRBILL_NBR, [Monthly Shortages].TRACKING_NBR, [Monthly
Shortages].PORT_ID, [Monthly Shortages].ORIGIN_LOCATION_CD, [Monthly
Shortages].ROUTE_NBR, [Monthly Shortages].SERVICE_CD
FROM [Monthly Shortages]
WHERE ((([Monthly Shortages].ARRIVAL_WORK_DT)="20100510") AND (([Monthly
Shortages].ROUTE_NBR) Like "*433"));


All fields are text. (I didn't create the table, I just access it.)



On 5/6/2010 3:10 PM, KARL DEWEY wrote:
Do you have any formating on the field?

Post the SQL of your query.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:29 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.