getrs是自定义函数,如果代码是从别处复制来的,请找到定义getrs这个函数代码,把它也复制到模块中。
Set rs = getrs(str)替换为:rs.open str,currentproject.Connection