• Query Question (2.0)

    Author
    Topic
    #383196

    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.

    Viewing 0 reply threads
    Author
    Replies
    • #652685

      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 cheers

      • #652943

        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!

    Viewing 0 reply threads
    Reply To: Query Question (2.0)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: