以下是引用yangming在2009-11-16 11:19:00的发言:
谢谢 mr725老师,目前就是按拼音排序的,我是想按我输入的顺序排序,
这个也可以用代码搞定:
Dim g As New GroupTableBuilder("临时表", DataTables("客户"))
g.Groups.AddDef("客户名称")
g.Build()
With DataTables("临时表")
.DataCols.Add("输入顺序", GetType(integer))
End With
for n as integer = 0 to tables("临时表").count-1
Dim dr As integer
dr = DataTables("客户").Compute("min(输入的序号)", "[客户名称] = '" & tables("临时表").rows(n)("客户名称") & "'")
tables("临时表").rows(n)("输入顺序") = dr
next
tables("临时表").sort = "输入顺序"
dim p0 as String
For n As integer = 0 to tables("临时表").count-1
p0 = p0 & "|" & tables("临时表").rows(n)("客户名称")
Next
'生产列表项目::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Tables("订单").Cols("客户").ComboList = p0 '或:p0.substring(1) '
[此贴子已经被作者于2009-11-16 12:40:54编辑过]