Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2001
    Orlando, FL
    Thanked 0 Times in 0 Posts

    Multiple table queries

    I have two tables that I am creating a query for and are linked. Even though I may only pull info from the first table, by having the second table as part of the query, affect the records that are returned. For example, I have two tables, Pets and Owners. They are linked by a Owner Number and is a One-Many relationship wheras one Owner may own several pets.

    I want to create a query that pulls all the pet names and the type of animal it is. I only add those two fields from the Pets table and do not want it to look at the Owner table. It does and bases the query result on the link between the tables. Why does it look at the Owner table even though no fields from the Owner table are to be included in the result. I know I can delete the Owner table out of the query, but next time I may want to include the Owner of each pet and do not want to create a different query.

    I hope this makes sense. If anyone can help this novice out I would appreciate it.


  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Sacramento, California, USA
    Thanked 1 Time in 1 Post

    Re: Multiple table queries

    What do you mean, it looks at the Owners table. If you didn't include any fields from that table, how do you know it looks at it? Or do you have the query's OutputAllFields property set to true?

    It is generally bad practice to create a query with tables in it that you don't use. It slows down the query and does you no good. You would have to change your interface anyhow if you decided to use owners, so being concerned about having two queries is a waste of time.

Posting Permissions

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