Refresh MS Access Form/Query Based On Combobox Value

吃可爱长大的小学妹 提交于 2019-11-29 16:58:19

You can refer to the value of a control in a query run from within an Access session, as long as the form which contains that control is open.

SELECT *
FROM YourTable
WHERE date_field_as_text Like "*" & Forms!YourForm!YourCombo;

So perhaps you can use a similar query as your form's record source, and do Me.Requery in the combo box's after update event.

If that's not close enough to what you want, please give us more information about the data types of the fields involved. Adding brief samples of the table data to your question could also help; please make it clear whether the "date" fields are text or Date/Time.

Yes, it's possible.Just add your stuff to the 'YourComboName.After_Update'. Look for the Events of the Form that are fired before the form is shown. There build your query as like HansUp suggested.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!