将表单文本控件的值传递给另一个表单的文本控件 [英] Transferring the value of a form's text control to another form's text control

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

问题描述

我有一个登录表单,用于将特定人员引导到自定义的交换机。所有登录过程都完美无缺。 (我不是为了安全而这样做,但为了简单起见,所以不用担心VBA的安全性问题。)


我需要的是获得一个未绑定的文本控件formSwitchboard用于查找在登录表单上输入的EID。我怎么能这样做?


提前谢谢!

解决方案

当你打开Switchboard表格时,使用< b> OpenArgs 参数传递值。


如何执行此操作的详细信息包含在最近的一个帖子中(如何将变量从一个表单传递到另一个表单)。


感谢您的链接。对不起,我是一个完整的编程新手,真的。只需几个月的任何编程经验。


我要做的是传递控件txtEID中的值。在formLogin到一个控件txtEIDGrab在fromSwitchboard上。通过在命令单击formLogin上运行的VBA序列验证凭据后,将打开formSwitchboard。如果凭证合法,则打开正确的交换机。


您可以帮我编写一下应该在打开formSwitchboard时运行的代码吗?


谢谢!


我们通常不会对简单的代码请求做出很好的反应,但正如您提出的要求很好并且有智能提供要使用的对象的名称我相信我们可以在这里做一点例外。


这只是短暂的,但请尝试:

展开 | 选择 | Wrap | 行号

I have a login form that I am using to direct particular people to a customized switchboard. All of the login process is working perfectly. (I am not doing this for security but for simplicity, so there is no concern about the faults of VBA for security.)

What I need is to get an unbound text control on the formSwitchboard to lookup the EID that was entered on the login form. How can I do this?

Thank you in advance!

解决方案

When you open the Switchboard form, use the OpenArgs parameter to pass the value across.

The details of how to do this are covered in a very recent thread (How to pass a variable from one form to another form).


Thank you for the link. I''m sorry, but I am a complete programming newbie, really. Just a few months experience with any programming of any kind.

What I am trying to do is pass the value that is in the control "txtEID" on formLogin to a control "txtEIDGrab" on fromSwitchboard. formSwitchboard opens after the credentials are verified through a VBA sequence that runs on a command click on formLogin. If the credentials are legitimate, the proper switchboard is opened.

Code you please help me with the code that should run on open of the formSwitchboard?

Thank you!


We don''t often respond well to simple requests for code, but as you asked nicely and had the intelligence to provide the names of the objects to work with I''m sure we can make a little exception here.

It''s only short, but try :

Expand|Select|Wrap|Line Numbers


这篇关于将表单文本控件的值传递给另一个表单的文本控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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