如何创建“重置过滤器” cmd按钮? [英] How to create a "reset filter" cmd button?

查看:121
本文介绍了如何创建“重置过滤器” cmd按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个包含两个组合框和两个cmd按钮的表单。表单的想法是用户将从每个组合框中选择搜索参数,然后单击第一个cmd按钮cmdCreateReport。在此过程中,它会根据搜索条件打开报告。


我的问题似乎在于seconf cmd按钮:

cmdRemoveFilter

I have created a form that contain two combo boxes and two cmd buttons. The idea of the form is that the user will select a search parameter from each combo box then will click the first cmd button "cmdCreateReport". Upon doing so it open a report based of the search criteria.

My problems seems to lay with the seconf cmd button :
cmdRemoveFilter

展开 | 选择 | Wrap | 行号

推荐答案

在cmdCreateReport中,在打开报告之前关闭报告。

我不确定这是否会产生错误报告未公开。如果是,您可以使用:

如果是CurrentProject.AllReports(" Report Name")。IsLoaded Then
In cmdCreateReport, close the report before you open it.
I''m not sure whether this creates an error when the report is not open. If it does, you can use:
If CurrentProject.AllReports("Report Name").IsLoaded Then


假设您在cmdCreateReport中尝试过.FilterOn = True 。
Assuming you tried .FilterOn = True in cmdCreateReport.


我不知道你在做什么?
@ChipR


你的意思是cmdCreateReport的属性还是你正在关注实际的事件程序/代码?


(请跟我说说我是一个neewbie,当涉及到vba但我正在努力学习)


谢谢,
I am not dure what youare reffering too @ChipR
Do you mean in the properties for cmdCreateReport or are youtalking about the actual event Procedure/code?

(Please bear with me I am a neewbie when it comes to vba but am trying to learn)

Thanks,


这篇关于如何创建“重置过滤器” cmd按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆