Dim r1 As Integer
Dim r2 As Integer
Dim str1 As String
Dim str2 As String
Dim t As Table = Tables("查询表.设置")
If t.Position <> 0 Then
r1 = t(t.Position,"ord")
str1 = t(t.Position,"名称")
str2 = t(t.Position-1,"名称")
If str1 IsNot Nothing And str2 IsNot Nothing Then
r2 = t.Findrow("[名称] = '" & str1 & "'",0,True)
t(r2,"ord") = r1-1
r2 = t.Findrow("[名称] = '" & str2 & "'",0,True)
t(r2,"ord") = r1
r2 = t.Findrow("[名称] = '" & str1 & "'",0,True)
t.Position = r2
t.sort="ord"
Else
msgbox("名称字段存在为空的记录,请更正!",64,"提示")
End If
End If
t 是一个table,没看到过table还有这样的语法操作,请教下!
[此贴子已经被作者于2020/8/11 12:02:20编辑过]