从另一个表单上的文本框到文本框 [英] from textbox to textbox on ANOTHER form

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

问题描述

你好


我有两种形式:项目和工程

在项目中我有一个文本框(V​​ARIANT1),用户将在其中输入一些文本。我希望此文本在第二个表单(ENGINEERING)上自动显示为另一个TEXTBOX(VARIANT1LABEL)上的文本。


我该怎么做???

解决方案

Forms!FormName!ControlName



Forms!FormName!ControlName



这完美无缺,谢谢。

我现在唯一的问题是第一种形式(PROJECTS)需要运行,这样当我打开第二种形式(工程)时,我就不会得到ERROR''2450''CANT找到表格(项目)。


有没有一种方法,而不是从表单(PROJECTS)显示文本框中的值,它显示PROJECTS TABLE上的值?已经存储并且不需要打开以便整个工作正常工作?


我尝试过:


Private Sub Form_open(取消为整数)

表格!工程!Variant1 =表格!项目!Variant1

结束子


但它不起作用(错误424 ,需要对象)。


我还发现第二个表单(ENGINEERING)上的文本框必须是UNBOUND才能生效。我需要绑定这个文本框,以便显示的输入存储在这个表格表(ENGINEERING TABLE)上,有没有办法实现这个目标?



再次感谢,

Gilberto


------------------------------- ----------------

Hello

I have two forms: Projects and Engineering
In PROJECTS i have a textbox (VARIANT1) where the user will enter some text. I want this text to automatically appear as text on another TEXTBOX (VARIANT1LABEL) on the second form (ENGINEERING).

How can i do this???

解决方案

Forms!FormName!ControlName


Forms!FormName!ControlName

This worked perfectly, thank you.

My only issue now is that the first form (PROJECTS) need to be running so that i dont get the ERROR ''2450'' CANT FIND THE FORM (PROJECTS) when i open the second form (ENGINEERING).

Is there a way that instead of displaying the value from the textbox from the form (PROJECTS) that it displays the value on the PROJECTS TABLE?? which is already stored and doesnt need to be OPEN so that the whole thing works?

ive tried:

Private Sub Form_open(Cancel As Integer)
Forms!Engineering!Variant1 = Tables!Projects!Variant1
End Sub

but it doesnt work (error 424, object required).

I also found out that the textbox on the second form (ENGINEERING) has to be UNBOUND so that this works. I NEED to BOUND this textbox so that the input displayed gets stored on this forms table (ENGINEERING TABLE), is there any way to accomplish this?


Thanks again,
Gilberto


-----------------------------------------------


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

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