从林老师那里学习了排序的窗口设计,如下(仅排序按钮代码)。运行正常。谢啦!!!
现在再请教一下,如果能使用到所有的窗口中,代码如何修改。昨天用了好多方法试了都不行,只好请专家指点一下。
Dim t As Table = Forms("筛选排序").Controls("Table1").TableDim sort As String = ""For Each r As Row In t.Rows If r.IsNull("列名") = False Then sort &= "," & r("列名") If r("排序方式") = "降序" Then sort &= " desc" End If End IfNext
Tables(Forms("成绩表_成绩录取").Name & "_Table2").Sort = sort.Trim(",")