gpt4 book ai didi

ms-access - 微软 Access : passing parameters from one access form to another

转载 作者:行者123 更新时间:2023-12-02 23:32:18 27 4
gpt4 key购买 nike

我有一个表单和一个按钮。我想通过单击按钮打开另一个表单,并将参数从父表单传递到子表单(子表单的 RecordSource 有参数)。我该怎么做?

最佳答案

您可以通过引用表单的对象来引用调用表单的任何属性。我不会用!表单属性的符号(我讨厌它)。所以如果你想继承:

表单的控件值:

forms(parentFormName).controls(controlName).value 

表单的记录集字段值:

forms(parentFormName).recordset.fields(fieldName).value

在 Access id (guid) 值时,记录集周转特别有用。您无法通过表单的控件读取这些值,但可以通过记录集中的相应字段 Access 它们。如果您的表单上有一个包含 guid 字段的组合框,请比较以下内容:

 screen.activeForm.controls(myComboControlName).value

 screen.activeForm.recordset.fields(myComboControlName).value

关于ms-access - 微软 Access : passing parameters from one access form to another,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1407940/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com