【发布时间】:2019-03-14 12:30:51
【问题描述】:
我有一个表单 (frm_subscriptions),顶部有两个组合框 - cbx_financialYearFilter 和 cbx_subscriptionSearch。我想根据 cbx_financialYearFilter 的选择来限制 cbx_subscriptionSearch 的选择。
我尝试使用下面的查询作为 cbx_subscriptionSearch 的行源:
SELECT tbl_subscriptions.Search, tbl_subscriptions.Financial_Year
FROM tbl_subscriptions
WHERE (((tbl_subscriptions.Financial_Year)=[Forms]![frm_subscriptions]![cbx_financialYearFilter]))
ORDER BY tbl_subscriptions.Search;
并且还设置了 cbx_subscriptionSearch 以重新查询 cbx_financialYearFilter 的更新后事件。这似乎是我看过的大多数地方的建议方法(例如这里:http://access-excel.tips/access-combo-box-value-depends-another/)。
但是,在我的情况下,我得到了一个 cbx_financialYearFilter 的“输入参数值”框。如果我重新进入财政年度,过滤器会正常工作,如果我取消过滤器,则不会执行任何操作。非常欢迎提出解决此问题的建议!
谢谢,马特
【问题讨论】:
-
双重检查表单/字段名称。例如。在即时窗口中,
Print [Forms]![frm_subscriptions]![cbx_financialYearFilter]工作吗? --cbx_financialYearFilter可能在子表单上吗? -
感谢安德烈,这帮助我走上了正轨!请参阅下面的答案
标签: ms-access combobox ms-access-2010