Results 1 to 12 of 12

Thread: Query

  1. #1
    Join Date
    Oct 2009
    Posts
    8

    Question Unanswered: Query

    hi,

    im fairly new to access but trying to build a fairly simple query of a table.

    I want to exclude from my query accounts with the description:

    Collection step. Passed to Company A. File 01 20091113

    where the file number is different on each account.

    So i tried useing an exclusion formula such as <>Like" Passed to Company A. ***"

    or [!Company A.]

    none of these seem to exclude the lines i want to.
    Can anyone help?

    Thanks

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Code:
    Not Like" Passed to Company A.*"
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Oct 2009
    Posts
    8
    Quote Originally Posted by pootle flump View Post
    Code:
    Not Like" Passed to Company A.*"
    Is that not the same as <> Like" Passed to Company A. *" ??

    Tried it and the lines are still included

    Thanks though

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Does the data actually start with "Collection Step."?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Oct 2009
    Posts
    8
    this is what it looks like per cell: ie all of this info is in one cell

    Collection step. Passed to XX XXXX. File XXX 01 20091113

    Sorry i had to replace the company as i dont think i should be posting these details if ya get me

  6. #6
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    If the company name is fixed:
    Code:
    Not Like "Collection step.  Passed to Company A.*"
    If it is not:
    Code:
    Not Like "Collection step.  Passed to *.*"
    Access: LIKE Condition (using wildcards) in Access 2003/XP/2000/97
    Testimonial:
    pootle flump
    ur codings are working excelent.

  7. #7
    Join Date
    Oct 2009
    Posts
    8
    Quote Originally Posted by pootle flump View Post
    If the company name is fixed:
    Code:
    Not Like "Collection step.  Passed to Company A.*"
    If it is not:
    Code:
    Not Like "Collection step.  Passed to *.*"
    Access: LIKE Condition (using wildcards) in Access 2003/XP/2000/97
    OK so lets say i have two companies campany A and B, in the format:

    Collection step. Passed to A Company. File A 01 20091113
    and
    Collection step. Passed to B Company. File A 01 20091245

    I want to exclude any line with a cell containing either of the above.

    I just tried..

    Not Like "Collection step. Passed to *A Company.*" //no joy
    Not Like "Collection step. Passed to A Company.*"// no joy

    Any ideas
    Last edited by l1ttledb; 02-19-10 at 04:33.

  8. #8
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    far better to think about a redesigning of your data so that the company ID is part of the data
    mind you you could use a different style of where clause
    where mycolumn like "*COMPANYNAME*"
    or
    where mycolumn NOT LIKE "*COMPANYNAME*"

    if "collection step.." is common then y'don't need it
    make certain the column containing whatever you are looking for is indexed
    I'd rather be riding on the Tiger 800 or the Norton

  9. #9
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by l1ttledb View Post
    Any ideas
    Yes, try what I posted.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  10. #10
    Join Date
    Oct 2009
    Posts
    8
    Quote Originally Posted by pootle flump View Post
    Yes, try what I posted.
    I have numerous times.. it wont exclude based on part of the cell for some reason

  11. #11
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    You know that what you posted in post #7 is not what I posted right? they are totally different and I would never expect what you posted to work.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  12. #12
    Join Date
    Oct 2009
    Posts
    8
    Quote Originally Posted by pootle flump View Post
    You know that what you posted in post #7 is not what I posted right? they are totally different and I would never expect what you posted to work.
    oh yeah i see they are different sry.. just frustrated with it. I give it another go

Posting Permissions

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