如果是在Access的VBA,在VBA中任一个模块中添加一个方法如Public Function Functionname([参数]) [As datatype]'代码end Function这样在窗体中就可以看到该函数了。