&
c &
"",adoPrimaryRS1.MoveFirst Do While Not adoPrimaryRS1.EOF adoPrimaryRS.AddNew adoPrimaryRS.Fields("员工编号") = adoPrimaryRS1.Fields("员 工编号")adoPrimaryRS.Fields("迟到次数") = 0 adoPrimaryRS.Fields("早退次数") = 0 adoPrimaryRS.Fields("缺席次数") = 0 adoPrimaryRS.Fields("离岗次数") = 0 adoPrimaryRS.Fields("备注") = "无"
adoPrimaryRS.Fields("年月") = c adoPrimaryRS1.MoveNext Loop adoPrimaryRS.Update Else40西北工业大学网络教育学院毕业论文MsgBox "
该 月 考 勤 表 已 经 创 建 , 确 认 开 始 浏 览 ! ", vbOKOnly + vbExclamation, "警告"
End If adoPrimaryRS.CloseadoPrimaryRS.Open "select kqinfo.员工编号,yginfo.姓名,kqinfo. 迟到次数,kqinfo.早退 次数,kqinfo. 缺席次数,kqinfo.离岗 次数,kqinfo.备 注,kqinfo.年月 from kqinfo,ygInfo where kqinfo.员工编号=yginfo.员工编 号 and kqinfo.年月="
&
c &
"", db, adOpenStatic, adLockOptimisticWith myFlexGrid .Rows = 2 .CellAlignment = 4 .TextMatrix(1, 0) = "员工编号"
.TextMatrix(1, 1) = "姓名"
.TextMatrix(1, 2) = "迟到次数"
.TextMatrix(1, 3) = "早退次数"
.TextMatrix(1, 4) = "缺席次数"
.TextMatrix(1, 5) = "离岗次数"
.TextMatrix(1, 6) = "备注"
.TextMatrix(1, 7) = "年月"
adoPrimaryRS.MoveFirst Do While Not adoPrimaryRS.EOF .Rows = .Rows + 1 .CellAlignment = 4 For j = 0 To adoPrimaryRS.Fields.Count - 1 .TextMatrix(.Rows - 1, j) = adoPrimaryRS.Fields(j)41西北工业大学网络教育学院毕业论文Next jadoPrimaryRS.MoveNext LoopEnd With Command3.Enabled = TrueEnd SubPrivate Sub Command2_Click() Dim i As Integer, j As Integer Dim xlapp As Excel.Application Dim xlbook As Excel.Workbook Dim xlsheet As Excel.Worksheet Set xlapp = CreateObject("excel.application") xlapp.Visible = True Set xlbook = xlapp.Workbooks.Add Set xlsheet = xlbook.Worksheets(1)xlsheet.Cells(1, 1) = "员工编号"
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/ruanjian/article-31446-16.html
很对很对我也这么认为