我的代码不想设置控件默认值 [英] My code doesn't wants to set the control default value

查看:117
本文介绍了我的代码不想设置控件默认值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!


我尝试从 NotInList 事件(复选框)打开表单并传递 NewData as OpenArgs

Hello !

I try to open a form from the NotInList event (check box) and to pass the NewData as OpenArgs.

展开 | 选择 | Wrap | 行号

推荐答案

Mihail,这是一个好奇的一。您是否验证过Form_Load中的代码是罪魁祸首?如果你注释掉
Mihail, that''s a curious one. Have you verified that your code in Form_Load is the culprit? If you comment out
展开 | 选择 | Wrap | 行号


我从两个不同的地方打开这个表格。

从其他地方我打开这个没有OpenArgs的形式(这就是为什么我在Form_Load中有IF语句)并且一切正常。


所以我很确定这段代码会给我带来麻烦。

就像你一样,我不明白为什么。


也许你应该知道我在 frmContoare_tipuri 中也有这段代码。
I open this form from two different places.
From other place I open this form without OpenArgs (it is why I have the IF statement in Form_Load) and all is OK.

So I''m very sure that this code bring me in trouble.
Just, like you, I don''t understand why.

Maybe you should know that I have also this code in frmContoare_tipuri.
展开 | 选择 | Wrap | 行号


我们可以从这些帖子中看到更多的事情。我怀疑更改默认值属性是否会导致问题。


事情是,#Name当控件源没有出现在表单的记录源中时,通常会出现在控件中。但是在连续的形式中,如果它发生的话,人们会期望它在每一行。


我还是会注释掉那一行并确认问题在你不执行时停止发生
There''s more happening than we can see from these posts. I doubt changing the default value property is causing the problem.

The thing is, that "#Name" usually appears in a control when the control source doesn''t appear in the recordsource of the form. But in a continuous form, one would expect it on every row if it happens at all.

I would still comment out that line and verify the problem stops happening when you don''t execute
展开 | 选择 | 换行 | 行号


这篇关于我的代码不想设置控件默认值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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