在mainform中编辑数据时,从mainform将值传递给子表单 [英] pass value to subform from mainform when edit data in mainform

查看:98
本文介绍了在mainform中编辑数据时,从mainform将值传递给子表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有子表单(frm_pyrovola)的mainform(frm_main)(与id链接,关系为1-many)。在子表单中,我有一个组合框字段,它从表/查询中获取数据,行代码如下:

I have a mainform (frm_main) with a subform (frm_pyrovola) (linked with "id", with relationship 1-many). In subform, i have a combobox field where it takes data from table/query with the code bellow in rowsource:

展开 | 选择 | Wrap | 行号

推荐答案

在尝试使用它之前,你需要重新查询组合框:

You nneed to requery the combo box before you try to use it:

< span class =codeLinkonclick =Blur(this,this.parentNode.parentNode,getChildren(this),true);>展开 | 选择 | Wrap | 行号


感谢您的回答,但同样的错误。它询问([forms]。[frm_main]。[id])。
Thanks for your answer, but same error. It asks about ([forms].[frm_main].[id]).


你什么时候重新查询组合框?在尝试在查询中收集数据时,错误就像表单未打开一样。


与此同时,我对组合框感到有些困惑。如果您的查询提取所有记录 ID = Main_Form.ID,应该是一条记录。为什么不在ID上过滤你的子表单。


也许我只是困惑....
When are you requerying the combo box? The error is acting like the Form is not open when it is trying to gather data in the query.

At the same time, I am a little confused by teh combo box. If your query pulls "all teh records" with ID = Main_Form.ID, that should be one record. Why not just filter your subform on the ID.

Maybe I am just confused....


这篇关于在mainform中编辑数据时,从mainform将值传递给子表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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