Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Mar 2001
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query criteria (Access 97 SR 2)

    I'm trying to write a Query to identify customers who have purchased some of my publications, but the latest publication. I'll send these a flier for the latest publication. As to those customers who have never bought any of my publications, I won't bother sending them anything. I have a field in the table to enter which publication(s) people have bought. I use abbreviations separated by a comma. So, customer 1 may have MB, SW, RC, F, W. Customer 2 might have just MB, RC. And so on. I want to have a Query that will tell me which customers have ever bought anything, but not the item known as "W". Can I do this with just one Query? Or should I run two Queries, one to separate out the people who have ever bought anything, then from that list those who have not bought "W"? I know this is probably pretty basic stuff, but I don't seem to be able to run down the answers using the Access help file.

  2. #2
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    La Verne, California, USA
    Posts
    313
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query criteria (Access 97 SR 2)

    In the query grid write in for the criteria Is Not Null AND <>W in the publications field.

  3. #3
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query criteria (Access 97 SR 2)

    In the Query critreia line

    Not Like "*W*"

    That particular field, should actually be a separate table, since it appears that you have a Many-To-Many relationship. Customers to publications.

    If this was split out, then your query would have been easier to do.
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  4. #4
    2 Star Lounger
    Join Date
    Mar 2001
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query criteria (Access 97 SR 2)

    Thanks, that worked nicely. Actually this is the first time since beginning to use Access 4 years ago that I have found it necessary to know which of my publications my customers had purchased. Until now it only mattered if they had bought anything.
    Clark

Posting Permissions

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