标题: 类型不符问题 [打印本页] 作者: sunredday 时间: 2002-7-22 04:52 标题: 类型不符问题 Public Function isopen(ByVal strformname As String) As String
Const condesignview = 0
Const conobjstateclosed = 0
isopen = False
If SysCmd(acSysCmdGetObjectState, acForm, strformname) <> _
conobjstateclosed Then
If Forms(strformname).CurrentView <> condesignview Then
isopen = True
End If
End If
End Function
Private Sub Form_Open(Cancel As Integer)
Dim frm As Form
frm=密码 '窗体名
If isopen(frm) = False Then
MsgBox "没有登陆啊", vbOKOnly, "提示"
DoCmd.Quit
End If
End Sub