Office中国论坛/Access中国论坛

标题: [求助]请各位大大帮看下程序 [打印本页]

作者: 狼书生    时间: 2006-8-31 20:11
标题: [求助]请各位大大帮看下程序
在写权限时写了个公用函数如下:

Public Function User_Power(Formname as string,Power as string,Level as integer)

dim Po as string

Po=Forms![Login]![Text_UserPower]

select case Level

Case 1

If Trim$(Po) <> Trim$(Power) Then

docmd.openform FormName

Forms![FormName].AllowAdditions = False    '运行到此处出错

Forms![FormName].AllowDeletions = False

Forms![FormName].AllowEdits =False

else

docmd.openform formName

End If

Case 2

``````````````````````````````````````````````````

end select

end Function

**************************************

调用时如下:

Call User_Power("订单审核",技术部经理,1)      '订单审核是窗体名

掉用后结果出现:找不到代码中引用的窗体"FormName"

请问该如果解决,是我的窗体引用不正确吗?[em01][em01][em01][em01]
作者: 狼书生    时间: 2006-9-2 05:25
是不是我问的问题太弱了啊 ?米人回答![em06][em06]

来个大虾告诉我下这里到底该怎么引用窗体啊?拜托了![em04]
作者: andymark    时间: 2006-9-2 06:45
Forms(Formname).AllowAdditions = False
Forms(Formname).AllowDeletions = False

Forms(Formname).AllowEdits = False




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3