过滤数据库中的值 [英] Filter values in database
本文介绍了过滤数据库中的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在找人解释如何按列过滤 ms-access 数据库并仅显示值高于文本框中给定值的单元格?
I am looking for someone to explain how to filter a ms-access database by column and display only cells which have higher values than given value from textbox?
示例:如果文本框中的给定值为 3:
Example: If given value in textbox is 3:
Column1
1
2
3
4
5
过滤...
Column1
4
5
推荐答案
您可以在查询中引用表单:
You can refer to a form in a query:
SELECT Column1
FROM ATable
WHERE Column1 > Forms!AForm!txtTextbox
您还可以对表单应用过滤器,对于当前表单,您可能会说:
You can also apply a filter to a form, for the current form, you might say:
Private Sub txtTextbox_AfterUpdate()
Me.Filter = "Column1>" & Me.txtTextbox
Me.FilterOn = True
End Sub
这篇关于过滤数据库中的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文