[ 本帖最后由 zyz218 于 2007-11-10 16:39 编辑 ]作者: zyz218 时间: 2007-11-10 16:37
Private Sub Form_Open(Cancel As Integer)
Forms!pay.Visible = False
If Not IsNull(DLookup("frmname", "power", "frmname='" & Me.Name & "' and users like '*" & CurrentUser & "*'")) Then
Exit Sub
Else
MsgBox "您无权进入,如有疑问请找管理员!", vbCritical, "无权进入"
DoCmd.Close acForm, Me.Name, acSaveNo
Forms!pay.Visible = True
End If
End Sub