如何在主窗体上显示子窗体值 [英] How to Display Subform Value on the Main Form
问题描述
我正在尝试将子表单中的值显示在主窗体上。它不是计算数据,只是纯文本。
这是我试图没有成功的原因。
1.创建一个名为Hero的文本框。在子窗体[sfrmItemsCast]页脚内。
2.在其控制源中我添加了这个函数:
= iif(([icrSort] = 1,[iccID]),"")
3.在主窗体上创建另一个文本框并将其添加到其控制源中:
= [sfrmItemsCast] .Form![Hero]
但我收到此错误消息:#Name?我应该提到icrSort是一个文本字段。
我的目标是在主表单上以精美的字体显示英雄的名字。
任何人都可以帮助我有这个问题?非常感谢。
I am trying to display a value from the sub form on to the main form. It''s not a calculated data, just plain text.
This is what I attempted without success.
1. Created a text box called "Hero" within the subform [sfrmItemsCast] footer.
2. In its control source I added this function:
=iif(([icrSort] = 1,[iccID]),"")
3. Created another text box on the main form and added this in its control source:
=[sfrmItemsCast].Form![Hero]
But I am getting this error message: #Name? I should mention that icrSort is a text field.
My goal is to display the hero''s name in a fancy font up on the main form.
Can anyone please help me with this problem? Thanks a lot.
推荐答案
@MNNovice
在控制源中尝试此操作主窗体中的文本框:
@MNNovice
Try this in the Control Source of the Text Box in the Main Form:
@ADezii
Adezeii:
我修改了代码以匹配表单的名称。但我得到的是语法无效。错误消息显示:您输入的逗号没有前面的值或标识符
@ADezii
Adezeii:
I modified the code to match names of my forms. But I am getting this "invalid syntax" error message that reads: "You have entered a comma without a preceding value or identifier"
@ MNNovice
上传数据库的可能性是什么?
@MNNovice
Any chance of Uploading the Database?
这篇关于如何在主窗体上显示子窗体值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!