在当前表中,按条件筛选指定行,并定位在当前选定行的集合的最后一行?
Dim Filter As String
With e.Form.Controls("客户")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "客户 = '" & .Value & "'"
End If
End With
If e.Form.Controls("已编").Checked = True ' 如果修改状态选择了"修改"
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "已编 = True "
End If
If Filter > "" Then
' CurrentTable.filter = Filter
CurrentTable.DataTable.LoadFilter = ""
CurrentTable.DataTable.Load
CurrentTable.Position = CurrentTable.Rows.Count - 1
End If
CurrentTable.Position = CurrentTable.Rows.Count - 1
e.Form.Controls("客户").Value = Nothing
e.Form.Controls("已编").Checked = false