Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Filter in Query (2002)

    Hi Again,

    I have a query that I need to keep all records with the name "backoffice" from showing in field [officecoded]. I'm not sure how to specify that in the criteria section of the query.

    Thanks,
    Leesha

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Filter in Query (2002)

    If you mean you only want to show records where "backoffice" does not appear, this is the way.

    <code>SELECT * FROM TableName WHERE TableName.OfficeCoded <> "backoffice"</code>

    if you mean you want to see all the records but not the word "backoffice", do it like this:

    <code>SELECT Field1, Field2, Field3, IIf([OfficeCoded]="backoffice","", [OfficeCoded]) AS OfficeCoded FROM TableName</code>

    Obviously, I'm assuming that your table is named TableName and you're selecting 4 fields, one of which is OfficeCoded and the others are represented by Field1, etc.
    Charlotte

  3. #3
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Filter in Query (2002)

    Thanks! This did what I needed it too. I chose option one as I wanted to eliminate rows with backoffice.

    Thanks,
    Alicia

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •