将表单文本控件的值传递给另一个表单的文本控件

编程入门 行业动态 更新时间:2024-10-10 23:17:51
本文介绍了将表单文本控件的值传递给另一个表单的文本控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个登录表单,用于将特定人员引导到自定义的交换机。所有登录过程都完美无缺。 (我不是为了安全而这样做,但为了简单起见,所以不用担心VBA的安全性问题。) 我需要的是获得一个未绑定的文本控件formSwitchboard用于查找在登录表单上输入的EID。我怎么能这样做? 提前谢谢!

解决方案

当你打开Switchboard表格时,使用 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

更多推荐

将表单文本控件的值传递给另一个表单的文本控件

本文发布于:2023-11-02 10:02:26,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1552087.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:表单   控件   文本

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!