Noleader
04-07-2004, 03:56 PM
Can someone tell me whats wrong with this...
strSQL = "SELECT PO_Requisition_Lines_All.Line_Num as intLineNum, " _
& "PO_Requisition_Lines_All.Item_Description as strReqItem, " _
& "PO_Requisition_Lines_All.Quantity as intReqQty, " _
& "PO_Requisition_Lines_All.Unit_Meas_Lookup_Code as strUnit, " _
& "PO_Requisition_Lines_All.Creation_Date as dtmReq, " _
& "PO_Requisition_Lines_All.Need_By_Date as dtmDue, " _
& "RCV_Transactions.Transaction_Date as dtmArr, " _
& "RCV_Shipment_Lines.Quantity_Received as intRecQty, " _
& "RCV_Shipment_Lines.Item_Description as strRecItem, " _
& "RCV_Shipment_Lines.Creation_Date as dtmAct, " _
& "RCV_Shipment_Headers.Receipt_Num as strRecNum "
strSQL = strSQL & "FROM PO_Requisition_Lines_All, " _
& "RCV_Transactions, " _
& "RCV_Shipment_Lines, " _
& "RCV_Shipment_Headers, " _
& "PO_Headers_All "
strSQL = strSQL & "WHERE ((PO_Headers_All.Segment1 = " _
& dVnt2SQLStr(txtBar(idxTXTPONUM).Text) & ") " _
& "AND (RCV_Shipment_Headers.Receipt_Num = " _
& dVnt2SQLStr(txtBar(idxTXTRECNUM).Text) & ") " _
& "AND (RCV_Shipment_Lines.Line_Num = " _
& dVnt2SQLStr(txtBar(idxTXTLINE).Text) & ") "
strSQL = strSQL & "AND RCV_Transactions.PO_Header_ID = " _
& "PO_Headers_All.PO_Header_ID " _
& "AND RCV_Shipment_Headers.Shipment_Header_ID = " _
& "RCV_Transactions.Shipment_Header_ID " _
& "AND RCV_Shipment_Lines.PO_Line_Location_ID = " _
& "RCV_Transactions.PO_Line_Location_ID " _
& "AND PO_Requisition_Lines_All.Line_Location_ID = " _
& "RCV_Transactions.PO_Line_Location_ID)"
:)
strSQL = "SELECT PO_Requisition_Lines_All.Line_Num as intLineNum, " _
& "PO_Requisition_Lines_All.Item_Description as strReqItem, " _
& "PO_Requisition_Lines_All.Quantity as intReqQty, " _
& "PO_Requisition_Lines_All.Unit_Meas_Lookup_Code as strUnit, " _
& "PO_Requisition_Lines_All.Creation_Date as dtmReq, " _
& "PO_Requisition_Lines_All.Need_By_Date as dtmDue, " _
& "RCV_Transactions.Transaction_Date as dtmArr, " _
& "RCV_Shipment_Lines.Quantity_Received as intRecQty, " _
& "RCV_Shipment_Lines.Item_Description as strRecItem, " _
& "RCV_Shipment_Lines.Creation_Date as dtmAct, " _
& "RCV_Shipment_Headers.Receipt_Num as strRecNum "
strSQL = strSQL & "FROM PO_Requisition_Lines_All, " _
& "RCV_Transactions, " _
& "RCV_Shipment_Lines, " _
& "RCV_Shipment_Headers, " _
& "PO_Headers_All "
strSQL = strSQL & "WHERE ((PO_Headers_All.Segment1 = " _
& dVnt2SQLStr(txtBar(idxTXTPONUM).Text) & ") " _
& "AND (RCV_Shipment_Headers.Receipt_Num = " _
& dVnt2SQLStr(txtBar(idxTXTRECNUM).Text) & ") " _
& "AND (RCV_Shipment_Lines.Line_Num = " _
& dVnt2SQLStr(txtBar(idxTXTLINE).Text) & ") "
strSQL = strSQL & "AND RCV_Transactions.PO_Header_ID = " _
& "PO_Headers_All.PO_Header_ID " _
& "AND RCV_Shipment_Headers.Shipment_Header_ID = " _
& "RCV_Transactions.Shipment_Header_ID " _
& "AND RCV_Shipment_Lines.PO_Line_Location_ID = " _
& "RCV_Transactions.PO_Line_Location_ID " _
& "AND PO_Requisition_Lines_All.Line_Location_ID = " _
& "RCV_Transactions.PO_Line_Location_ID)"
:)