使用Form或Subform对象作为函数中的参数 [英] Using a Form or Subform object as a parameter within a function

查看:204
本文介绍了使用Form或Subform对象作为函数中的参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在表单模块中,我正在调用一个试图传递Form或Subform对象的公共函数。

不幸的是,我继续得到一个?类型不匹配?调用函数时出错。


表单模块中的调用函数:

From within a form module, I am calling a public function attempting to pass a Form or Subform object.
Unfortunately, I continue to get a ?Type mismatch? error when calling the function.

Calling function within Form module:

展开 | 选择 | 换行 | 行号

推荐答案

我觉得很难相信。您在代码方式中所拥有的内容似乎绝对在按钮上。


您可以通过在立即窗格(Ctrl-G)中键入以下内容来检查SubForm对象的名称:
I find this very hard to credit. What you have in the way of code seems absolutely on the button.

Can you check the name of the SubForm object itself by typing the following in the Immediate Pane (Ctrl-G) :
展开 | 选择 | Wrap | 行号





我附上了一个非常简单的邮编具有复制问题的源的文件。它有一个包含子表单的MainForm。


我试图打印出子表单的名称。


我需要添加我。 Subform_groupNames.Name建议打印出子表单的名称。





Hi,

I''ve attached a very simple zip file with the source that replicates the issue. It has a MainForm containing a Subform.

I did attempt to print out the name of the subform.

I needed to add Me.Subform_groupNames.Name to your suggestion to print out the name of the Subform.
附加文件
TestSubformPass.zip (29.4 KB,91 views)
Attached Files
TestSubformPass.zip (29.4 KB, 91 views)


我对代码不好。你可以发布你看到的结果吗?


我现在离开,直到周末之后。不同寻常的是,当我回来看看时,我会下载你的数据库。一般来说,大多数专家(包括我自己)都没有兴趣下载任何不首先要求的东西,但正如我所说,这是一个有趣的。


做好准备延迟回应。
My bad on the code. Can you post the result you saw?

I''m away now till after the weekend. Unusually, I will download your database when I get back and have a look. Generally, most experts (myself included) would not be interested in downloading anything that wasn''t first requested, but as I say, this is an interesting one.

Be prepared for a delay responding though.


这篇关于使用Form或Subform对象作为函数中的参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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