将fieldname传递给子例程

将fieldname传递给子例程

本文介绍了将fieldname传递给子例程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含子表单的表单。在子表单中,我有几个字段

,我正在为文件服务器上的文档分配链接。我学会了

(从这个列表:-)如何添加链接。因为我将执行

四个或五个字段的代码,我希望有一个通用的

子例程来传递字段名称参数。我已经搜索了并且

为此尝试了很多格式和语法但没有成功。


以下是我希望做的更多的例行程序的原则行

一般


lnkApplication = varFile& "#" &安培; varFile''将超链接放在

字段中。


lnkApplication.Visible = Not(IsNull(lnkApplication.Value))''仅

显示表单上的字段,如果它有一个路径


lnkApplication是一个名为

tblFamilyMembers的表中字段的实际名称。


请帮助我使用语法将字段名传递给一般的

子程序并修改上面的行。另外,请告诉我

是否需要额外的代码才能使其工作。


谢谢,

伯尼

I have a form with a subform. In the subform I have several fields to
which I am assigning links to documents on the file server. I learned
(from this list :-) how to add the links. Because I will be executing
the code for four or five fields, I would like to have a generic
subroutine to pass the field name parameters to. I have searched and
tried many formats and syntaxes for this with no success.

Here are the principle lines from the routine that I wish to make more
general

lnkApplication = varFile & "#" & varFile '' puts the hyperlink in the
field.

lnkApplication.Visible = Not (IsNull(lnkApplication.Value)) '' only
shows the field on the form if it has a path in it

lnkApplication is the actual name of the field in a table called
tblFamilyMembers.

Please help me with the syntax to pass the fieldnames to a general
subroutine and to modify the lines above. Also, please let me know if
there are any additional lines of code needed to make it work.

Thanks,
Bernie

推荐答案






函数声明应为:


Sub wibble(MyControl as Control)


-

David W. Fenton

usenet at dfenton dot com


这篇关于将fieldname传递给子例程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 18:13