以下是引用片段:
相关代码如下: 添加考勤信息 Dim strResult As String Dim i As Long Dim ii As Long If Me.Tag = New Then strResult = Exec_SqL( insert into KQ(kqid,ygid,nf,yf,jlsj,czid) values( & mYgkq.kqid & & mYgkq.ygid & & mYgkq.nf & & mYgkq.yf & & mYgkq.jlsj & & mYgkq.jlrid & ) ) If strResult <> OK Then MsgBox strResult Exit Sub End If For i = 1 To 4 If ddd.RowHeight(i) <> 0 Then strResult = Exec_SqL( insert into KQMX(kqid,zwmc,day1,day2,day3,day4,day5,day6,day7,day8,day9,day10,day11,day12,day13,day14,day15,day16,day17,day18,day19,day20,day21,day22,day23,day24,day25,day26,day27,day28,day29,day30,day31) values _ & ( & mYgkq.kqid & & Trim(ddd.TextMatrix(i, 0)) & & Trim(ddd.TextMatrix(i, 1)) & & Trim(ddd.TextMatrix(i, 2)) & & Trim(ddd.TextMatrix(i, 3)) & & Trim(ddd.TextMatrix(i, 4)) & _ & & Trim(ddd.TextMatrix(i, 5)) & & Trim(ddd.TextMatrix(i, 6)) & & Trim(ddd.TextMatrix(i, 7)) & & Trim(ddd.TextMatrix(i, 8)) & & Trim(ddd.TextMatrix(i, 9)) & & Trim(ddd.TextMatrix(i, 10)) & _ & & Trim(ddd.TextMatrix(i, 11)) & & Trim(ddd.TextMatrix(i, 12)) & & Trim(ddd.TextMatrix(i, 13)) & & Trim(ddd.TextMatrix(i, 14)) & & Trim(ddd.TextMatrix(i, 15)) & & Trim(ddd.TextMatrix(i, 16)) & _ & & Trim(ddd.TextMatrix(i, 17)) & & Trim(ddd.TextMatrix(i, 18)) & & Trim(ddd.TextMatrix(i, 19)) & & Trim(ddd.TextMatrix(i, 20)) & & Trim(ddd.TextMatrix(i, 21)) & & Trim(ddd.TextMatrix(i, 22)) & _ & & Trim(ddd.TextMatrix(i, 23)) & & Trim(ddd.TextMatrix(i, 24)) & & Trim(ddd.TextMatrix(i, 25)) & & Trim(ddd.TextMatrix(i, 26)) & & Trim(ddd.TextMatrix(i, 27)) & & Trim(ddd.TextMatrix(i, 28)) & _ & & Trim(ddd.TextMatrix(i, 29)) & & Trim(ddd.TextMatrix(i, 30)) & & Trim(ddd.TextMatrix(i, 31)) & ) ) If strResult <> OK Then MsgBox strResult Exit Sub End If End If Next
|