Sub

编程入门 行业动态 更新时间:2024-10-24 14:27:18
本文介绍了Sub-SubForm参考问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个表单(frmDeal)有一个子表单(frmDeal_Tranche),它有一个 子表单(frmDeal_TrancheCusip)。 当我尝试引用Cusip上的属性。表格在链的末尾, MS Access正在抛出2455:表达式对财产的无效引用 表格/报告 在立即窗口中: ------------------------------------- ----- ?me.Name frmDeal ?me.subTranche.Form.Name frmDeal_Tranche ?me.subTranche.Form!subCusips.name subCusips ?me .subTranche.Form!subCusips.SourceObject frmDeal_TrancheCusip ?me.subTranche.Form!SubCusips.Form.name ( 2455:表达式对财产表格/报表的引用无效) --------------------------- --------------- 我是否试图将MS Access推向远处? 或我只做一些简单而愚蠢的事情吗? - PeteCresswell

解决方案

(PeteCresswell)写道:

我有一个表单(frmDeal)有一个子表单(frmDeal_Tranche),它有一个 子表单(frmDeal_TrancheCusip)。 当我尝试引用时对于Cusip的属性表格在链的末尾, MS Access正在抛出2455:表达式对财产的无效引用 表格/报告 在立即窗口中: --------------------------------- --------- ?me.Name frmDeal ?me.subTranche.Form.Name frmDeal_Tranche ?me.subTranche.Form!subCusips.name subCusips ?me.subTranche.Form!subCusips.SourceObject frmDeal_TrancheCusip ?me.subTranche.Form!SubCusips.Form.name (2455:表达式对财产表格/报告的引用无效) ----------------------- ------------------- 我是否想把MS Access推向远方? 或者我只做一些简单而愚蠢的事情?

除了我没看到你如何获得 a参考即时窗口中的表格,以便 我可以工作,这应该可以工作。 你已经和第四个电话一样深了 一起去第五个就子范式而言。至于对象去DAO比那更深。 你有没有尝试过Fairfield先生的建议 跳过点击你的方式通过层次结构 并且只使用:Form_frmDeal_TrancheCusip.Name? blockquote>

在Sun,03 2006年9月14日28:02 - 0400,(PeteCresswell) < x@y.Invalid> 写道:

>我有一个表格(frmDeal)有一个子表格(frmDeal_Tranche)有一个子表单(frmDeal_TrancheCusip)。 当我尝试引用Cusip上的属性时链接末尾的表单, MS Access正在抛出2455:表达式无效引用属性表单/报告 在立即窗口中: ------------------------------------------ ?我。姓名 frmDeal ?me.subTranche.Form.Name frmDeal_Tranche ?me.subTranche.Form!subCusips.name subCusips ?me.subTranche.Form!subCusips.SourceObject frmDeal_TrancheCusip ?me.subTranche.Form!SubCusips.Form.name (" 2455:表达式对财产表格/报告的无效引用) --------------------------------- --------- 我是不是想把MS Access推向远方? 或者我只是做一些简单而愚蠢的事情?

也许这是特定版本的东西?我刚用Access 2000在我的 即时窗口中运行了这个: ?me.Name frmDeal ?me.subTranche.Form.Name frmDeal_Tranche ?me.subTranche.Form!subCusips.name subCusips ?me.subTranche.Form!subCusips.SourceObject frmDeal_TrancheCusip ?me.subTranche.Form !SubCusips.Form.name frmDeal_TrancheCusip - = - = - = - = - = - = - = - = - = - = - = - = Randy Harris tech at promail dot com

Per rkc:

>除了我没有看到你如何获得在即时窗口中对表单的引用这一事实,以便我工作,这应该工作。

我在加载表单的过程中停止了代码。 好​​抓。我会回去尝试从表单外部复制它 - 知道如果.RecordSource后面没有记录,MS Access可以 抛出一个错误之类的东西(不确定它是否完全相同)我发布的那个。 - PeteCresswell

I''ve got a form (frmDeal) that has a subform (frmDeal_Tranche) that has a subform (frmDeal_TrancheCusip). When I try to refer to properties on the "Cusip" form at the end of the chain, MS Access is throwing "2455: Expression has invalid reference to Property Form/Report" In an Immediate window: ------------------------------------------ ?me.Name frmDeal ?me.subTranche.Form.Name frmDeal_Tranche ?me.subTranche.Form!subCusips.name subCusips ?me.subTranche.Form!subCusips.SourceObject frmDeal_TrancheCusip ?me.subTranche.Form!SubCusips.Form.name ("2455: Expression has invalid reference to Property Form/Report") ------------------------------------------ Am I trying to push MS Access to far? Or am I just doing something simple-and-dumb? -- PeteCresswell

解决方案

(PeteCresswell) wrote:

I''ve got a form (frmDeal) that has a subform (frmDeal_Tranche) that has a subform (frmDeal_TrancheCusip). When I try to refer to properties on the "Cusip" form at the end of the chain, MS Access is throwing "2455: Expression has invalid reference to Property Form/Report" In an Immediate window: ------------------------------------------ ?me.Name frmDeal ?me.subTranche.Form.Name frmDeal_Tranche ?me.subTranche.Form!subCusips.name subCusips ?me.subTranche.Form!subCusips.SourceObject frmDeal_TrancheCusip ?me.subTranche.Form!SubCusips.Form.name ("2455: Expression has invalid reference to Property Form/Report") ------------------------------------------ Am I trying to push MS Access to far? Or am I just doing something simple-and-dumb?

Aside from the fact that I don''t see how you are getting a reference to the form in the immediate window so that Me works at all, that should work. You are already as deep with the forth call as you are going with the fifth as far as subForms go. As far as objects go DAO is deeper than that. Have you tried Mr. Fairfield''s recommendation of skipping dotting your way through the hierarchy and just using: Form_frmDeal_TrancheCusip.Name?

On Sun, 03 Sep 2006 14:28:21 -0400, "(PeteCresswell)" <x@y.Invalid> wrote:

>I''ve got a form (frmDeal) that has a subform (frmDeal_Tranche) that has asubform (frmDeal_TrancheCusip).When I try to refer to properties on the "Cusip" form at the end of the chain,MS Access is throwing "2455: Expression has invalid reference to PropertyForm/Report" In an Immediate window:------------------------------------------?me.NamefrmDeal?me.subTranche.Form.NamefrmDeal_Tranche?me.subTranche.Form!subCusips.namesubCusips?me.subTranche.Form!subCusips.SourceObjectfrmDeal_TrancheCusip?me.subTranche.Form!SubCusips.Form.name("2455: Expression has invalid reference to Property Form/Report")------------------------------------------Am I trying to push MS Access to far?Or am I just doing something simple-and-dumb?

Perhaps it''s something version specific? I just ran this in my immediate window with Access 2000: ?me.Name frmDeal ?me.subTranche.Form.Name frmDeal_Tranche ?me.subTranche.Form!subCusips.name subCusips ?me.subTranche.Form!subCusips.SourceObject frmDeal_TrancheCusip ?me.subTranche.Form!SubCusips.Form.name frmDeal_TrancheCusip -=-=-=-=-=-=-=-=-=-=-=-= Randy Harris tech at promail dot com

Per rkc:

>Aside from the fact that I don''t see how you are gettinga reference to the form in the immediate window so thatMe works at all, that should work.

I stopped the code during the process of loading the form. Good catch. I''ll go back and try to replicate it from outside of the form - knowing that if there are no records behind a .RecordSource that MS Access can throw an error something like (not sure if it''s exactly the same) the one I posted. -- PeteCresswell

更多推荐

Sub

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

发布评论

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

>www.elefans.com

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