Purpose of using sub routines over functions

后端 未结 7 1159
抹茶落季
抹茶落季 2021-02-07 07:38

I\'ve been working with Access for a while now, and although I understand the obvious benefit of a Function over a Sub, been that it can return values as a result, I\'m not sure

7条回答
  •  别跟我提以往
    2021-02-07 08:30

    You will note that events are always subs, never functions. However, in MS Access, it can be useful to create functions when you wish to use them as the property of an event:

    On Close: = MyCloseFunction()
    

    Subs can return a value ByRef.

提交回复
热议问题