Set Rst1 = dbs.OpenRecordset("SELECT PaiChan_REMOTE.* FROM PaiChan_REMOTE WHERE (((PaiChan_REMOTE.Team)='" & c & "') AND ((PaiChan_REMOTE.Release_Date)=# " & d & " #)) order by PaiChan_REMOTE.RQST;")
Set xlsBook = xlsAPP.Workbooks.OPEN("D:\散件生产计划系统\PaiChanforPI.XLT")
Set xlsSheet = xlsBook.Worksheets("PAICHAN")
xlsSheet.Activate
cur_r = 4
If Rst1.EOF = False Then
xlsSheet.Cells(1, 1) = Rst1!Team
Rst1.MoveFirst
For i = 1 To Rst1.RecordCount
cur_r = cur_r + 1
xlsSheet.Cells(cur_r, 1) = Rst1!CUST_CLAS71
'xlsSheet.Cells(cur_r, 2) = Rst1!Remark
xlsSheet.Cells(cur_r, 2) = Rst1!id
xlsSheet.Cells(cur_r, 3) = Rst1!CO_NO
xlsSheet.Cells(cur_r, 4) = Rst1!Line_No
xlsSheet.Cells(cur_r, 5) = Rst1!CO_Item
xlsSheet.Cells(cur_r, 6) = Rst1!QTY
xlsSheet.Cells(cur_r, 7) = Rst1!Serial_No
xlsSheet.Cells(cur_r, 8) = Rst1!Desc
xlsSheet.Cells(cur_r, 9) = Rst1!RQST '
xlsSheet.Cells(cur_r, 10) = Rst1!CustAkDt
xlsSheet.Cells(cur_r, 12) = Rst1!Info11
xlsSheet.Cells(1, 12) = Rst1!Release_Date
'........后面自已加
'画格子
With xlsSheet.Range(xlsSheet.Cells(cur_r, 1), xlsSheet.Cells(cur_r, 12)).Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With xlsSheet.Range(xlsSheet.Cells(cur_r, 1), xlsSheet.Cells(cur_r, 12)).Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With xlsSheet.Range(xlsSheet.Cells(cur_r, 1), xlsSheet.Cells(cur_r, 12)).Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With xlsSheet.Range(xlsSheet.Cells(cur_r, 1), xlsSheet.Cells(cur_r, 12)).Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With xlsSheet.Range(xlsSheet.Cells(cur_r, 1), xlsSheet.Cells(cur_r, 12)).Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Rst1.MoveNext
Next i
End If
Exit_cmdxls_Click:
Exit Sub
Err_cmdxls_Click:
MsgBox err.Description
Resume Exit_cmdxls_Click
End Sub
复制代码
作者: todaynew 时间: 2010-9-15 11:24
把这句:
38.Set Rst1 = dbs.OpenRecordset("SELECT PaiChan_REMOTE.* FROM PaiChan_REMOTE WHERE (((PaiChan_REMOTE.Team)='" & c & "') AND ((PaiChan_REMOTE.Release_Date)=# " & d & " #)) order by PaiChan_REMOTE.RQST;")
改成:
38.Set Rst1 = dbs.OpenRecordset("SELECT * FROM PaiChan_REMOTE WHERE Team='" & c & "' AND Release_Date=# " & d & " # order by ID") 作者: 石三少 时间: 2010-9-15 11:45
钱太少,观望中,希望涨价!现在什么都涨,你怎么可以不涨?作者: yanwei82123300 时间: 2010-9-15 15:52
todaynew 谢谢帮助我改试试!