Access中是否可以使用间接子/功能? [英] Is indirect sub/function possible in Access?
问题描述
是否可以调用名称在
字符串中的子程序或函数?
Is it possible to call a subroutine or function whose name is in a
string?
推荐答案
为什么要制作生活比这更复杂吗?
有什么比这更简单:
打电话给MySubroutine
或
MyFunction(MyParameter)
-
PC数据表
您的资源获取Access,Excel和Word应用程序的帮助
www.pcdatasheet.com
" dchow" <直流*** @ hotmail.com>在消息中写道
新闻:i2 ******************************** @ 4ax.com ...
Why make life any more complicated than it is?
What could be simpler than:
Call MySubroutine
or
MyFunction(MyParameter)
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
www.pcdatasheet.com
"dchow" <dc***@hotmail.com> wrote in message
news:i2********************************@4ax.com...
是否可以调用名称在
字符串中的子例程或函数?
Is it possible to call a subroutine or function whose name is in a
string?
" dchow" <直流*** @ hotmail.com>在消息中写道
新闻:i2 ******************************** @ 4ax.com ...
"dchow" <dc***@hotmail.com> wrote in message
news:i2********************************@4ax.com...
是否可以调用名称在
字符串中的子程序或函数?
Is it possible to call a subroutine or function whose name is in a
string?
我无法想象为什么任何人都想要这样做。我从未觉得
需要这样做。您是否正在尝试克服某个特定问题?
如果您认为它会带来任何好处,您可以在新模块中编写类似
的内容:
Public Sub DoSomething(strWhat As String)
Select Case strWhat
Case" One":Call One
Case" ;两个:拨打两个
案例三个:拨打三个
案例其他:MsgBox我不知道该怎么做
结束选择
结束子
私人子一()
MsgBox一个
结束子
私人子二()
MsgBox两个
结束子
Private Sub Three()
MsgBoxThree
End Sub
Fletcher
I can''t imagine why anyone want might to do this. I have never felt the
need to do so. Is there a particular problem you are trying to overcome?
If you thought it would bring any advantage, you could write something like
this in a new module:
Public Sub DoSomething(strWhat As String)
Select Case strWhat
Case "One": Call One
Case "Two": Call Two
Case "Three": Call Three
Case Else: MsgBox "I don''t know what to do"
End Select
End Sub
Private Sub One()
MsgBox "One"
End Sub
Private Sub Two()
MsgBox "Two"
End Sub
Private Sub Three()
MsgBox "Three"
End Sub
Fletcher
DC -
请参阅访问帮助中的评估函数主题。
- Brian
- 文章< i2 ************** ******************@4ax.com>,
dc *** @ hotmail.com 说...
DC -
See the ''Eval Function'' topic in Access Help.
- Brian
-- In article <i2********************************@4ax.com>,
dc***@hotmail.com says...
是否可以调用名称在
字符串中的子程序或函数?
Is it possible to call a subroutine or function whose name is in a
string?
删除NOSPAM以回复...
Remove NOSPAM to reply...
这篇关于Access中是否可以使用间接子/功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!