只能写个字符串累加函数来解决
Leijia:
Dim strRsFilter As String
Dim strLeijia As String
With frm.RecordsetClone
If .RecordCount < 1 Then GoTo exitFunction
.MoveFirst
Do Until .EOF
strLeijia = ""
strRsFilter = ""
For lngfield = 1 To UBound(arrField)
If arrField(lngfield, 3) = "chr" Then arrField(lngfield, 3) = "'"
strRsFilter = strRsFilter & arrField(lngfield, 5) & arrField(lngfield, 1) & arrField(lngfield, 2) & arrField(lngfield, 3) & .Fields(arrField(lngfield, 4)) & arrField(lngfield, 3)
Next
rs.Filter = strRsFilter
If rs.RecordCount >= 1 Then
Do Until rs.EOF
strLeijia = strLeijia & rs.Fields(arrField(0, 4)) & IIf(arrField(0, 5) = "vbcrlf", vbCrLf, arrField(0, 5))
rs.MoveNext
Loop
.Edit
.Fields(arrField(0, 1)) = strLeijia
.Update
End If
.MoveNext
Loop
frm.Form.Requery
End With
rs.Close