>SELECT VAL(Customer.Code) as ValCode,Invhead.*, Ordhead.location, Ordhead.entered, ; >Ordhead.priorityorder, ; >Ordhead.customerpo,Ordhead.daterequired, ; >Ordhead.comm1, Ordhead.comm2, Ordhead.comm3, Ordhead.terms, Customer.name, ; >Customer.code, Customer.creditlmt, Customer.einnumber, ; >Customer.specialdisc, Customer.dollarsuse, Ordhead.customerid, ; >Customer.Country as CustCountry, ; >ProdQty.TotOrdered,ProdQty.TotAllocated,ProdQty.TotShipped,.F. as Ok, ; >RdyToShip.RdyToShip,Shipped.Shipped, ProdQty.SpecialOrd, ; >ALLTRIM(STR(OrdHead.OrderId))+IIF(OrdHead.SBO,"B"," ") as DispOrdNo,Customer.OnHold ; >FROM frantisi!ordhead ; >INNER JOIN frantisi!invhead ON Ordhead.orderid = Invhead.orderid ; >INNER JOIN frantisi!shipped ON Ordhead.orderid = Shipped.orderid ; >INNER JOIN frantisi!rdytoship ON Invhead.invoiceno = Rdytoship.invoiceno ; >INNER JOIN frantisi!customer ON Customer.customerid = Ordhead.customerid ; >INNER JOIN frantisi!prodqty ON Ordhead.orderid = Prodqty.orderid ; > WHERE ( Ordhead.daterequired <= ( ?ldDateReqd ) ; > AND Ordhead.location = ( ?lnLocation ) ) ; > AND ( EMPTY(dispatchdate) ; > AND NOT (EMPTY(Invhead.picked) ) ) ; >ORDER BY Ordhead.priorityorder desc, 1,Invhead.InvoiceNo>
>ldDateReqd=thisform.DateRequired.Value >lnLocation=thisform.Location.value >=Requery("DISPATCH") >>When this code executes, there is no data returned, yet if I run it in the view designer, it works.