Query Mystery

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MNNovice
    Contributor
    • Aug 2008
    • 418

    Query Mystery

    I have a query that's built on 3 tables - and it works just fine but when I add a couple of more tables it stops working. I know this is not enough info to give me a suggestion. However, I am not sure how much detailed info is needed to get this resolved.

    Any suggestions?
  • ChipR
    Recognized Expert Top Contributor
    • Jul 2008
    • 1289

    #2
    What do you mean by "stops working"? No records returned, an error, crashes your computer?

    Comment

    • MNNovice
      Contributor
      • Aug 2008
      • 418

      #3
      Well, I got no records.

      Comment

      • ChipR
        Recognized Expert Top Contributor
        • Jul 2008
        • 1289

        #4
        I assume that when you say "add a couple more tables" that you mean join with other tables on certain fields. Your best bet is to include one additional join at a time and observe the resulting records so that you can see exactly where you are eliminating all the records. You should be able to narrow it down to a particular field that is not Joining as you expect.

        Comment

        • MNNovice
          Contributor
          • Aug 2008
          • 418

          #5
          ChipR

          Thanks. Yes, I identified the table and the field. But here is my problem, if I exclude that table, I cannot get one field to display that only exists in that table. Let me explain.

          tblGrants has GrantID (PK auto) and GrantNo and GrantTitle. Total 3 fields. If I cannot join this table I have no other table that includes GrantNo or GrantTitle.

          Does it make sense what I am trying to accomplish? Thanks for your help.

          Comment

          • ChipR
            Recognized Expert Top Contributor
            • Jul 2008
            • 1289

            #6
            I'm not sure exactly what you are trying to do, but I understand the need to include that table. The question is, Which field are you joining on, and why isn't it returning any records?

            Comment

            • MNNovice
              Contributor
              • Aug 2008
              • 418

              #7
              ChipR:

              I solved it by creating a new query based on two other queries.

              I have a new problem though. This time with the report. Thanks for your time.

              Comment

              • NeoPa
                Recognized Expert Moderator MVP
                • Oct 2006
                • 32661

                #8
                If you're still interested it may be an idea to post the SQL of the query before any attempt to add tblGrants, then specify which field(s) should be used to link it in. That way we could better understand what the problem is we need to look at.

                Comment

                Working...