Function 常用语(表名 As String, 字段名 As String, 频度 As Long) As String
Dim rs As New ADODB.Recordset
Dim ssql As String
Dim str As String
ssql = "SELECT " & 字段名 & ", Count(" & 字段名 & ") AS 计数 "
ssql = ssql & " FROM " & 表名
ssql = ssql & " GROUP BY " & 字段名
ssql = ssql & " HAVING Count(" & 字段名 & ")>=" & 频度
rs.Open ssql, CurrentProject.Connection, adOpenKeyset, adLockOptimistic
For i = 1 To rs.RecordCount
str = str & rs(字段名) & ";"
rs.MoveNext
Next
常用语 = str
End Function
(界面_窗体_子窗体-相关文章技巧链接): 【Access小品】常用语实例 作者: heqing3000 时间: 2010-1-1 17:41
谢谢!作者: heqing3000 时间: 2010-1-1 17:58
请问楼主,这个用在什么地方?作者: todaynew 时间: 2010-1-1 18:22