|
Option Compare Database
Option Explicit
Type FormLimit
Usufruct As Boolean
Query As Boolean
MoneyQuery As Boolean
Edit As Boolean
MoneyEdit As Boolean
Report As Boolean
MoneyReport As Boolean
End Type
Public typFormLimit As FormLimit
Public Sub GetFormLimit(strFormName As String)
On Error GoTo GetFormLimit_Err
Dim strSubName As String
Dim rst As New ADODB.Recordset
Dim cn As New ADODB.Connection
Dim strSQL As String
Set cn = CurrentProject.Connection
strSubName = "GetFormLimit"
strSQL = "Select * from tbl权限分配 where 用户名称='" & strUserID & "' And 窗体名称='" & strFormName & "'"
rst.Open strSQL, cn, adOpenKeyset, adLockPessimistic, 1
typFormLimit.Usufruct = rst!Usufruct
typFormLimit.Query = rst!Query
typFormLimit.MoneyQuery = rst!MoneyQuery
typFormLimit.Edit = rst!Edit
typFormLimit.MoneyEdit = rst!MoneyEdit
typFormLimit.Report = rst!Report
typFormLimit.MoneyReport = rst!MoneyReport
rst.Close
Exit Sub
GetFormLimit_Err:
MsgBox err.Description
End Sub
|
|