重置表单上的控件 [英] Reset Controls on a Form

查看:59
本文介绍了重置表单上的控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含子窗体窗口的表单。我在此表单上有一个命令按钮,只清除表单上的控件。但是,如果我在子窗体窗口中输入数据,则cmd按钮不会清除它。请帮助。

这里是代码:

I have a form with a subform window. I have a command button on this form that clears only the controls on the form. However, if I enter data into the subform window, the cmd button won''t clear it. Help please.
Here''s the code:

展开 | 选择 | Wrap | 行号

推荐答案

尝试拍摄(评论)On Error Resume Next线和看到什么(如果)错误出现。它可能与绑定控件有关。如果没有,可能存在具有验证规则的控件,这意味着DefaultValue无效。

如果没有更多信息,很难猜到更多。
Try taking (commenting) out the "On Error Resume Next" line and seeing what (if) errors turn up. It''s probably connected with bound controls. If not, there may be controls which have validation rules which mean the DefaultValue is invalid.
It''s hard to guess more without more info really.



尝试拍摄(评论)On Error Resume Next线和看到什么(如果)错误出现。它可能与绑定控件有关。如果没有,可能存在具有验证规则的控件,这意味着DefaultValue无效。

如果没有更多信息,很难猜到更多。
Try taking (commenting) out the "On Error Resume Next" line and seeing what (if) errors turn up. It''s probably connected with bound controls. If not, there may be controls which have validation rules which mean the DefaultValue is invalid.
It''s hard to guess more without more info really.



NeoPa,


我们再见面,你到处都是(大师??)。我接受了On Error Resume Next出。现在它正在抱怨

NeoPa,

We meet again, you''re all over the place (guru??). I took the "On Error Resume Next" out. Now it''s complaining about

展开 | 选择 | Wrap | 行号


这是否附带Rosie的解释。这比错误数字更具说明性(我不记得所有你知道的事情:D)

当你在寻找时,你能得到什么 ctl.DefaultValue 请给我(因为它有错误)。
Did that come with an explanation Rosie. That would be a little more indicative than an error number (I don''t memorise them ALL you know :D)
While you''re looking, can you get what ctl.DefaultValue is for me please (at the point that it errors).


这篇关于重置表单上的控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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