Results 1 to 10 of 10
  1. #1
    Erictsang is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    154

    Code for Not equal to


    Dear all

    I want to set a query requirement as "Not equal to "Sugar"as on my list

    Thanks

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Maybe:

    <> "Sugar"
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    Erictsang is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    154
    Strange, i try <>" 自理 " but this is not working

    it returns with no values

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by Erictsang View Post
    Strange, i try <>" 自理 " but this is not working
    it returns with no values
    What are the characters you have between the quotes.

    Please show us your SQL statement
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    Erictsang is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    154
    Here is the quote

    SELECT Registration.ID, Registration.Appl, Registration.Gender, Registration.C_FULLNAME, Registration.FULLNAME, Hotel.HOTELNAME, Registration.ARR_TRF, Registration.Arr_Date, Registration.Arr_Flight, Registration.Arr_Time, Registration.Departure, Registration.Dept_Date, Registration.Dept_Flight, Registration.Dept_Time, Registration.[Pick up]
    FROM Hotel INNER JOIN Registration ON Hotel.ID = Registration.ID
    WHERE (((Registration.ARR_TRF)<>"自理"));

  6. #6
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,803
    Are you trying to use characters you see in a table field that has been encrypted? You are copying these characters in order to be able to use them?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    Erictsang is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    154
    "自理" this is what on the data in the field

  8. #8
    Erictsang is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    154
    when i put = "自理", all retrieve out

    Not i want all data except
    "自理"

    Eric

  9. #9
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Try (in SQL view)
    NOT ( fieldname = "自理" )

  10. #10
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,803
    In post 3 you include a space " 自理 ". In your sql, you do not, but I don't think that's the problem if you've got the correct record field value in post 7?
    <>"自理" works for me when a test field contains 自理 and the field is text. Perhaps you have some sort of mask involved, though a password type field mask can only show *'s AFAIK. Or is this a number field? You might have to post a zipped copy of your db so we can investigate better.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Does not equal filtering using vba
    By mr879 in forum Programming
    Replies: 7
    Last Post: 05-12-2014, 12:55 PM
  2. Three Fields - will NOT be equal -
    By pj33558 in forum Queries
    Replies: 3
    Last Post: 04-21-2014, 04:05 PM
  3. Not equal
    By slimjen in forum Queries
    Replies: 3
    Last Post: 04-21-2014, 12:44 PM
  4. Using Is Not Equal To in a query
    By Demerit in forum Queries
    Replies: 2
    Last Post: 12-26-2013, 04:25 AM
  5. Set Numbers equal to each other
    By ygu3 in forum Access
    Replies: 1
    Last Post: 07-16-2009, 07:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums