Results 1 to 2 of 2
  1. #1
    neockder is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    14

    Where condition true part not working correctly

    Ok, so.. I posted in the forms section and now realize my problem probably should be in here! Thanks in advance for any help, i truely appreciate it.



    Here's the problem:

    I have a master form, a top subform of orders in datasheet view, and bottom subform that populates with what order you have selected in the top datasheet. In the bottom subform there is a subsub form that shows, in datasheet view, items that are linked to that order you have selected.

    there is an item type table [invMats] that associates all available items with what kind of item they are.

    Now, on the master form i have a dropdown [selectType] that filters the orders based upon what type of items are associated with that order.

    If the dropdown box is null, it will bring up all orders with all items, as it should. and if you select a type in the dropdown, it will sort the orders based upon if it has items linked to it that are of that type.

    It all works flawlessly, aside from one little problem. If an order has no items on it at all, then that order will not show up if the dropdown box is null, or populated. So essentially all orders that don't have any items (including new orders) will never show up.

    The SQL that accomplishes this, is on the top orders subform (the datasheet one) and looks as follows:

    SELECT POs.*
    FROM POs INNER JOIN (invMats INNER JOIN invRec ON invMats.matID = invRec.matID) ON POs.PO = invRec.dbPO
    WHERE (((IIf([Forms]![POmaster]![selectType] Is Null,"",((([invMats].[dept])=[Forms]![POmaster]![selectType]))))<>False));

    I need something in the truepart that will allow the Where condition to show all orders.. regardless of items..

    thank you for the help!!!!

  2. #2
    troggernaught is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    5
    I'm about to go to bed so I just quickly glanced over your problem, but look into LEFT JOIN rather than INNER JOIN. Hopefully that's your issue.

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

Similar Threads

  1. Condtion not working correctly
    By hawkins in forum Access
    Replies: 3
    Last Post: 09-07-2011, 02:59 PM
  2. Start and Stop times where condition true
    By cheshire_smile in forum Queries
    Replies: 3
    Last Post: 07-05-2011, 09:59 PM
  3. Replies: 5
    Last Post: 03-17-2011, 06:21 AM
  4. Split Form not working correctly
    By Brian62 in forum Access
    Replies: 29
    Last Post: 02-16-2010, 05:43 PM
  5. Search field is not working correctly
    By jakeao in forum Programming
    Replies: 9
    Last Post: 05-18-2009, 07:47 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