Results 1 to 7 of 7
  1. #1
    Loc is offline Novice
    Windows Vista Access 2007
    Join Date
    May 2013
    Posts
    27

    What am I missing????

    I want to build a query using 2 tables and have this information returned into a form. The problem is one of the tables has no data in it (OdrQty) when I run my query it shows no results but if I delete the table with no data it works just fine. Problem is this table will not always be populated with data right away and I need to have both tables up for my query to give the proper information. If I put data in the OdrQty table it works just fine from the tests I did. I do have a relationship between the two tables I just don't know what I am missing.

    Here is what it looks like.
    SELECT Parts.PartNo, Parts.Description, Parts.OnHand, Parts.ReOrderPt, Parts.MinOrder, OdrQty.Complete, OdrQty.OdrQty


    FROM Parts INNER JOIN OdrQty ON Parts.PartID = OdrQty.PardID
    WHERE (((Parts.OnHand)<=[ReOrderPt]) AND ((OdrQty.Complete)=No) AND ((OdrQty.OdrQty)=0));

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    You have an INNER join, change to outer (LEFT or RIGHT).

    Why are you joining these tables for a form? For which table will the form be used to enter data?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Loc is offline Novice
    Windows Vista Access 2007
    Join Date
    May 2013
    Posts
    27
    What I a doing is making an inventory database for parts I have in stock. This is to be a query for the reorder screen form for parts but, I only want to show what I need to reorder and if I have the parts on order already it would not show them. This was the reason for the tables to be linked and so I can see a history of what parts came in, if they were ordered and is the order complete. This way if the parts are on order then the order would not doubled. But the query is not allowing me filter this information properly, if I am going about this the wrong way I am open for a suggestion.

    Thanks for the reply.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    Did you try changing the join type as suggested?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Loc is offline Novice
    Windows Vista Access 2007
    Join Date
    May 2013
    Posts
    27
    Does not like outer statement. There needs to be data in my other 2 tables I have linked to the tables for the query to work The problem stems from the other tables having no data or entry when it runs the query. If there is a record number in the other 2 tables with no other data the Query works just fine. I tried the "is null" and that seems not to make any change.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    The outer query should be possible. Want to provide db for analysis? Follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Loc is offline Novice
    Windows Vista Access 2007
    Join Date
    May 2013
    Posts
    27
    I am sorry I did get it to work but it's not working out the way I needed it. I was getting the results I wanted the problem was in the Criteria and how I was searching for it. The problem was I could not do the search using the table OdrQty. The reason is a conflict in the Criteria and the results partial data, no data or all the data. It was not what I was looking for so I want to thank you for the help you have given me it was the correct information and it did help me. What I am going to have to do is put this information into a new table and then when the parts are received I have to transfer that information into OrderQty table. The proble is I have to try to figure out how I want to do this and the steps needed.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Missing Reference
    By teebumble in forum Access
    Replies: 17
    Last Post: 10-05-2011, 01:35 PM
  2. What is missing in it?
    By cap.zadi in forum Forms
    Replies: 7
    Last Post: 10-05-2011, 12:47 AM
  3. ok what am i missing here ?
    By baseborn in forum Forms
    Replies: 6
    Last Post: 12-21-2010, 01:46 PM
  4. Missing file
    By faceofevil in forum Access
    Replies: 2
    Last Post: 11-01-2010, 10:55 PM
  5. Missing Tables?
    By mrb398 in forum Access
    Replies: 2
    Last Post: 08-30-2010, 02:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums