Announcement

Collapse
No announcement yet.

Access 2000 Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Access 2000 Question

    I am having trouble making a query.
    I want the resulting rows to only appear if the phone number on the row does not appear in another table.

    Table Main contains all kinds of info including name and phone number.
    Table Used contains a list of phone numbers.

    To reiterate:
    I want the rows from the "Main" table to appear in the query only if the phone number of that row does not appear in the "Used" table.

    I have Access 2000 for Dummies, a pocket Guide to access and a few internet sites that I have been looking at. For some reason my brain is not figuring this out. The DCount and DLookup functions seem promising but I am not understanding the syntax.

  • #2
    you will need to enter the following in SQL view

    select * from main where phone not in (select phone from used)




    there may be a more elegant way of doing this but this is simple and does work

    Regards MD
    Interests include:
    Computing, Reading, Pubs, Restuarants, Pubs, Curries, More Pubs and more Curries

    Comment


    • #3
      Many thanks. I knew it had to be relatively simple.

      Comment


      • #4
        Arrrggghhh!

        Just wasted a couple of hours because there was a row with a NULL text string as an entry in the phone table. Aaarrrggghhh! I couldn't figure out why no returns were being returned and it was taking several minutes per query. (~30000 items being checked against 2500 items with the

        Comment

        Working...
        X