Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    May 2001
    Location
    New Jersey, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query Question (2.0)

    I'm trying to see which work orders have material on order and when it is due in. About 50% of our orders
    need me to order material and for the other 50% we have material in house.

    The IIF statement I am using looks like this:

    OrderDate: IIf(([tblPurchaseOrderLineItems]![WorkOrder])>0,[tblPurchaseOrdersMainHeader]![Order/ChangeDate],"Allocated")

    With 0 being the default until a work order is entered into the column.
    The result I get is every work order is "allocated".
    Before I was just getting the work orders in which we ordered material.
    I want every work order to show up in one column, the order date in another and the due date in a third.

    Any ideas?

    I appreciated any help.

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Query Question (2.0)

    The Work Order number you are testing there is from the tblPurchaseOrderLineItems table, shouldn't it be from the table tblPurchaseOrdersMainHeader?
    Is there a Line item for every MainHeader record? What happens where there is no Line item, does the WorkOrder number return Null?
    Post your database and someone will be able to help.
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  3. #3
    Star Lounger
    Join Date
    May 2001
    Location
    New Jersey, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query Question (2.0)

    Kinda answered my own question.

    My IIf statement worked fine once I turned on the grouped by.

    There were multiple deliveries of material for certain work orders and it needed grouped by to work properly.

    Thanks!

Posting Permissions

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