OpenTable(goWCServer.oConfig.oTask.cBTSPath+[key\A]+m.bn,[AppExp]) >>>>>> >>>>>> >>>>>> >>>>>> *Select columns from table above, name them for Excel headers >>>>>> SELECT bn as [BatchNum],; >>>>>> pk as [RecNo],; >>>>>> "" as [Approved],; >>>>>> shdt as [ShipDate],; >>>>>> canm as [Carrier],; >>>>>> prno as [Pro],; >>>>>> blno as [BOL],; >>>>>> shnm as [Shipper],; >>>>>> ozp as [OZip],; >>>>>> conm as [Consignee],; >>>>>> dzp as [DZip],; >>>>>> wtttl as [Weight],; >>>>>> "" as [ReWeigh],; >>>>>> "" as [Notes],; >>>>>> accd1 as [Acc1],; >>>>>> acamt1 as [Amt1],; >>>>>> accd2 as [Acc2],; >>>>>> acamt2 as [Amt2],; >>>>>> accd3 as [Acc3],; >>>>>> acamt3 as [Amt3]; >>>>>> FROM AppExp; >>>>>> into cursor ApprovalA >>>>>> >>>>>> >>>>>> SELECT ApprovalA >>>>>>*Copy data from cursor to Excel file >>>>>>COPY TO ("C:\test\"+[bn]+m.bn+[T2.xls])>>>>>>
m.bnin = ALLTRIM(TRANSFORM(Request.Form("bn"))) >> m.bn = PADL(m.bnin,7,"0")>
NumberRecords = GetWordCount(m.bnin) >FOR i = 1 to NumberRecords > m.bn = PADL(GetWordNum(m.bnin, i, ","),7,"0") > OpenTable(....) > SELECT... >ENDFORAlright, I just tried it and it's still only giving me the first file I type in, ignoring the comma and other file I type after it... This is what the code looks like now:
NumberRecords = GETWORDCOUNT(m.bnin) FOR i = 1 TO NumberRecords m.bn = PADL(GetWordNum(m.bnin, i, ","),7,"0") *Opens the DBF file in the "key" folder, appends "A" and adds the user input as batch number OpenTable(goWCServer.oConfig.oTask.cBTSPath+[key\A]+m.bn,[AppExp]) *Select columns from table above, name them for Excel headers SELECT bn as [BatchNum],; pk as [RecNo],; "" as [Approved],; shdt as [ShipDate],; canm as [Carrier],; prno as [Pro],; blno as [BOL],; shnm as [Shipper],; ozp as [OZip],; conm as [Consignee],; dzp as [DZip],; wtttl as [Weight],; "" as [ReWeigh],; "" as [Notes],; accd1 as [Acc1],; acamt1 as [Amt1],; accd2 as [Acc2],; acamt2 as [Amt2],; accd3 as [Acc3],; acamt3 as [Amt3]; FROM AppExp; ENDFOR *Copy data from cursor to Excel file COPY TO ("C:\test\"+[bn]+m.bn+[T2.xls])