请帮助SubRoutines .. [英] Help with SubRoutines please..

查看:54
本文介绍了请帮助SubRoutines ..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hiya们,即使我已经潜伏了一段时间,我也有点新发帖。想了解帮助我为学校建立数据库的话题。


但是现在我需要进一步的帮助。

坦率地告诉你们我在VB上花了很多时间,我的编码非常混乱。我在下面优化我的代码寻找一些帮助...也许是一个或两个子程序...我试着自己做,但我仍然搞砸了。嘿。

展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号

解决方案

你可以这样做:


Me.txtSec21.Enabled = Me.chkSecTwo

Me.txtSec22.Enabled = Me.chkSecTwo

Me.txtSec23.Enabled =我。 chkSecTwo

Me.txtSec24.Enabled = Me.chkSecTwo

Me.txtSec25.Enabled = Me.chkSecTwo

Me.txtSec2A.Enabled = Me .chkSecTwo

Me.txtSec2B.Enabled = Me.chkSecTwo

Me.txtSec2C.Enabled = Me.chkS ecTwo


我已经拿到了你的第二部分......如果直接把价值放到相应的控件上,那就是Instaed写的!


如果不是每个控制你需要一个单独的线...至少一个!


如果你不喜欢这个...你需要但是你需要的控制数据数据库和循环数据库设置各自的值!但这很长,这并不重要!


Marry Cristmas!


Hiya伙计们,我有点新发帖,即使我已经潜伏了一段时间......阅读有助于我为我的学校建立数据库的主题。


但现在我需要进一步帮助。

坦率地告诉你们我在VB上花了很多时间,而且我的编码非常混乱。我在下面优化我的代码寻找一些帮助...也许是一个或两个子程序...我试着自己做,但我仍然搞砸了。嘿。

展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号


我在VB6中只做过这种事情,所以它可能是不同。但也许你可以将每组控件放在一个选项组,或者表单中,或者它所谓的任何控件(我忘了)。然后启用/禁用该容器而不是每个控件。


okie ...感谢promt回复人员。

i肯定会尝试一下。


欢呼!


Hiya guys, im kinda new to posting here even though ive been lurking for awhile..reading up on topics that had helped me in building a database for my school.

But now i need further help.
To tell you guys frankly i suck big time on VB and my coding is in such a dire mess. Im looking for some help in optimizing my code below...perhaps a subroutine or two...i tried to do it on my own, but ive messed up still. Heh.

Expand|Select|Wrap|Line Numbers

解决方案

U can do sth like this:

Me.txtSec21.Enabled = Me.chkSecTwo
Me.txtSec22.Enabled = Me.chkSecTwo
Me.txtSec23.Enabled = Me.chkSecTwo
Me.txtSec24.Enabled = Me.chkSecTwo
Me.txtSec25.Enabled = Me.chkSecTwo
Me.txtSec2A.Enabled = Me.chkSecTwo
Me.txtSec2B.Enabled = Me.chkSecTwo
Me.txtSec2C.Enabled = Me.chkSecTwo

I''ve got your second section... Instaed writting if, directly put the value to the respective control!

If not for each control u need a separate line... At least one!

If u don''t like this... u need to but the data for ur controls in a database and than cycle the database setting the respective values! But this is long and this doesn''t matter the efforts!

Marry Cristmas!

Hiya guys, im kinda new to posting here even though ive been lurking for awhile..reading up on topics that had helped me in building a database for my school.

But now i need further help.
To tell you guys frankly i suck big time on VB and my coding is in such a dire mess. Im looking for some help in optimizing my code below...perhaps a subroutine or two...i tried to do it on my own, but ive messed up still. Heh.

Expand|Select|Wrap|Line Numbers


I''ve only done this sort of thing in VB6, so it may be different. But perhaps you could put each group of controls in an option group, or form, or whatever it''s called (I forget). Then just enable/disable that container rather than each of the controls.


okie...thanks for the promt replies guys.
i will try it out definitely.

cheers!


这篇关于请帮助SubRoutines ..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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