• Query criteria (Access 97 SR 2)

    Author
    Topic
    #375477

    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.

    Viewing 1 reply thread
    Author
    Replies
    • #611218

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

    • #611219

      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.

      • #611234

        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

    Viewing 1 reply thread
    Reply To: Query criteria (Access 97 SR 2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: