Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Remove item from a query
James Browne 
      
3 years ago
Hi,

I am trying to remove the item IPR Support Unit from a query (see pic) I have tried using NOT to remove it but it's giving me a Mismatch error.

I know there is probably and easy answer to this but I'm stumped.
James Browne OP  @Reply  
      
3 years ago

Kevin Robertson  @Reply  
          
3 years ago
Can you tell us the exact criteria you used.
Kevin Yip  @Reply  
     
3 years ago
Hi James, "NOT" is for Yes/No fields.  For text or numeric fields, you need to use:

    MyField <> "IPR Support Unit"
James Browne OP  @Reply  
      
3 years ago
Thanks guys!

I'll give that a try Kevin.
Kevin Robertson  @Reply  
          
3 years ago
'Not' also works for text fields.
Scott Axton  @Reply  
        
3 years ago
Depending on your query, as Kevin Robertson eluded to, if the referred to is relational you may need to specify that ID.  
If it isn't relational - Why isn't it?   You shouldn't be storing repeating data.
Kevin Yip  @Reply  
     
3 years ago
Hi Kevin, in the criteria box on the query design screen, if you type

   Not "IPR Support Unit"

the SQL screen will show the actual SQL statement, which will convert the above to:

   Not (MyField = "IPR Support Unit")

So the "Not" operator is still used for boolean expressions only, as it has always been the case.

The query designer lets you type "NOT 'text value'" merely to convenient the user.  It is not the actual SQL syntax.  Lots of expressions allowed by the query designer are not the actual legal SQL syntax (e.g. the criteria box lets you type >1 And <10, but the actual SQL syntax is field>1 And field<10).  The actual SQL statement shown on the SQL screen is the actual syntax, and it is what counts.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/8/2026 6:50:12 PM. PLT: 1s