473,671 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Like Criteria is not filtering like it's supposed to be

7 New Member
I have a linked table I am attempting to filter data out of. One of my field has several acronyms and I am looking only for 1 specificly "XTL" When I use the like "XTL" in the criteria field it is not filtering out all the other acrynyms in actuallity it is doing nothing at all. This table is a linked ODCB connection will this affect filtering using the like statement?
Oct 1 '10 #1
6 2127
nico5038
3,080 Recognized Expert Specialist
Try:

Expand|Select|Wrap|Line Numbers
  1. like "%XTL%"
  2.  
And be sure that the acronym is in Capitals...

Nic;o)
Oct 1 '10 #2
Ron Mowry
7 New Member
I tried that and it did not filter anything. I am a bit confused as to why this is not working. I am no guru in Access however I have used that function many times before and I am at a loss as to why this is not working.
Oct 4 '10 #3
nico5038
3,080 Recognized Expert Specialist
Hmm, you could try to use a PassThrough query. Change the query type to PassThrough and enter a select statement in the SQL-language of the ODBC database.
When it's e.g. Oracle you'll need % as wild character.

Nic;o)
Oct 4 '10 #4
colintis
255 Contributor
If you are using the query within Access, try using * instead of % and ' instead of "

Expand|Select|Wrap|Line Numbers
  1. like '*XTL*'
This is the M$ standard...i hate to say this b'cause M$ change alot of SQL standard function characters to another things we need to discover....
Oct 5 '10 #5
NeoPa
32,569 Recognized Expert Moderator MVP
Ron, Your question is particularly unclear. You say you are looking for the value 'XTL' yet you say you are using the Like construct. You have also not posted any SQL at all, which may have given us a chance to work out what your question should have been.

If you are looking for values of precisely 'XTL' then simply use = in your WHERE clause. If you are looking for any value with 'XTL' embedded within it then use '*XTL*' in most cases, but '%XTL%' if you have ANSI-92 compatibility set in your database options.

If you continue to have problems then please post your existing SQL and explain clearly what is going wrong.
Oct 5 '10 #6
NeoPa
32,569 Recognized Expert Moderator MVP
Colintis:
This is the M$ standard...i hate to say this b'cause M$ change alot of SQL standard function characters to another things we need to discover....
Not entirely true. The * is simply an older standard that MS still support, but they do provide the option of compatibility with the later standard (%). The quotes issue is MS as far as I've been able to tell. It's more about making it nooby-friendly than any desire to trip up standards though. Frustrating at times, but there is actually solid reasoning behind it, whether we agree with that reasoning or not. See ANSI Standards in String Comparisons for more on this.
Oct 5 '10 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

14
10465
by: David Lozzi | last post by:
OK, I know how to use to pull up all records that contains the keyword, but what about not containing the keyword? I've tried NOT LIKE but i get Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another Any ideas? Thanks!
6
5264
by: AAVF | last post by:
Hi We have a problem with a query. An Access database links via ODBC to a UNIX server. To speed things, we use the ODBC to load the relevant tables to the local PC that runs Access so that all querying is done locally. One of the reports we run allows the user to list all invoices within a period. They are also allowed to select a customer code and a product set on
1
3382
by: S. van Beek | last post by:
Dear reader, How can I filter a numeric field with Like as criteria in a query. To filter a numeric field with <10 as criteria this will com back with the result of those records for which the value is smaller as teen. But in case this value is variable and you prefer to work with "Like
1
1632
by: Jer | last post by:
I have a query that uses LIKE in the criteria. The criteria I am using is: LIKE "Program*". When I look at the query results it works fine. When I try to open the query as a recordset using Dim cp_data As Recordset Set cp_data = New Recordset cp_data.Open "xxxTEST", CurrentProject.Connection, adOpenStatic, adLockOptimistic I don't get any records. ("xxxTEST" is the name of my test query) What is different using the LIKE criteria from...
1
2070
by: ken | last post by:
When I use Like "*" for query criteria it does not include Null records...how can I include null records with the Like criteria?
8
2958
by: Steve Jorgensen | last post by:
Mailing List management is a good example of a case where my conundrum arises. Say there is a m-m relationship between parties and groups - anyone can be a member of any combintation of groups. Now, let's say the user wants to be able to send mailings to people who have various combinations of membership and non-membership in those groups. Here's a medium-complex example: (Knitting Group or Macrame Group) and Active Contact and Mailing...
9
2443
by: Drum2001 | last post by:
Hello All! I am using the following code during an On Click event for a button. It works properly to create a query for a report: Private Sub Command14_Click() If IsNull(Me.Text30) Then ' No criteria here - so ignore Else strWhere = strWhere & ",'" & Me.Text30.Value & "'"
1
1934
by: Froefel | last post by:
I'm trying to populate a gridview control based on a user's search criteria, but what seemed like a trivial task turns out to be a nighmare for this newbie... maybe someone can help. Here's the (simplified) business requirement: 1. Allow the user to specify search criteria (country, action, status) 2. Display results of the search in a gridview, after the using clicks the search button. 3. Allow paging and sorting on the gridview 4....
17
5690
by: sharsy | last post by:
Hello guys, I would like some help in generating query criteria that will identify credit cards that have expired on an access database. The specific Field is formatted with a Data Type of 'Text' and has an input mask of '00/00', so all expiry dates are set out for example as 10/13 (which represents October 2013). I have hada brief go at trying to work it out, but I was unable to
3
9762
by: copleyuk | last post by:
I'm using the following to builder a search criteria: Private Sub btnSearch_Click() ' Update the record source Me.frmsubClients.Form.RecordSource = "SELECT * FROM qryClientData " & BuildFilter ' Requery the subform Me.frmsubClients.Requery End Sub
0
8390
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8819
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8597
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8667
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7428
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6222
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4222
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2808
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2048
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.