如果选择的列是数值列,比如双精度,是不能添加单引号的
With CurrentTable
Dim dr As String = .Cols(.Colsel).Name
Dim Index As Integer = -1
if .Cols(.Colsel).IsNumeric
Index = .FindRow( dr & " = " & Val , .Position + 1,True)
elseif .Cols(.Colsel).IsString
Index = .FindRow( dr & " = '" & Val & "'", .Position + 1,True)
end if
If Index >= 0 Then
.Position = Index
End If
End With