标题: Access中字符串如何排序? [打印本页] 作者: 王为人 时间: 2013-7-4 10:23 标题: Access中字符串如何排序? 作者: 淡写轻描 时间: 2013-7-4 12:30
Function orderStr(str As String) As StringDim s As StringDim j As LongDim n As Longs = Mid(str, 1, 1)For j = 1 To Len(str) If Mid(str, j, 1) < s Then s = Mid(str, j, 1): n = j &#39;计算最小值及其位置。Nextstr = s & Replace(str, s, &quot;&quot;,1, 1) &#39;排序orderStr = strEnd Function