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