作者: hr0713 时间: 2010-3-12 07:30
高手们,帮看看作者: asklove 时间: 2010-3-12 08:19
Function ntadd(t As String) As String
Dim str As String
Dim rs As New ADODB.Recordset
Dim n As Integer
rs.Open "select distinct 施工部门 from 切割单 where 钢板编号='" & t & "'", CurrentProject.Connection, adOpenKeyset, adLockOptimistic
n = rs.RecordCount
For i = 1 To n
str = str & "," & rs("施工部门")
rs.MoveNext
Next
ntadd = Mid(str, 2, Len(str))
If Left(ntadd, 1) = "," Then ntadd = Right(ntadd, Len(ntadd) - 1)
End Function作者: hr0713 时间: 2010-3-12 09:17
谢谢!谢谢!可以了