Function P()
Dim rs1 As New adodb.Recordset
Dim rs2 As New adodb.Recordset
Dim A
Dim i As Long, j As Long
rs1.Open "表1", CurrentProject.Connection, adOpenKeyset, adLockOptimistic
rs2.Open "表1", CurrentProject.Connection, adOpenKeyset, adLockOptimistic
For i = 1 To rs1.RecordCount
A = Split(rs1("员工").Value, "|")
For j = 0 To UBound(A, 1)
rs2.AddNew
rs2("部门").Value = rs1("部门").Value
rs2("员工").Value = A(j)
rs2.Update
Next
rs1.Delete
rs1.Update
rs1.MoveNext
Next
rs1.Close
rs2.Close
End Function作者: 157008880 时间: 2010-9-16 16:04
以上高手能不能以这个做个小小的实例发上来,让我们学习学习?????????作者: aslxt 时间: 2010-9-16 23:06 本帖最后由 aslxt 于 2010-9-16 23:31 编辑