|
我用的是access+sql2000.执行下面代码之后出现 [ 当前提供程序不支持"索引"功能必需的界面"] 请高手指点
Private Sub ctExplorer1_lbItemClick(ByVal nList As Integer, ByVal nItem As Integer)
On Error GoTo TC_Err
Dim func As String, mdl As String
With ctExplorer1
'点击时自动打开相应的功能,相应的功能 已经保存在项目的lbItemCargo属性中
If Not IsNull(ctExplorer1.lbItemCargo(nList, nItem)) Then
mdl = ctExplorer1.lbItemCargo(nList, nItem)
'调用openCmd打开相应功能(窗体或报表或函数)
OpenCmd mdl
Exit Sub
End If
End With
Exit Sub
TC_Err:
glMessageBox "错误:" & Err.Description
Exit Sub
End Sub
'根据参数打开对应的窗体/报表/函数
Public Sub OpenCmd(mdl As String)
On Error GoTo OC_Err
Dim rs As New ADODB.Recordset
Dim conn As New ADODB.Connection
Dim func As String
Dim strsql As String
Set conn = CurrentProject.Connection
strsql = "select * from tblProgItem"
rs.Open strsql, conn, adOpenStatic, adLockReadOnly
rs.Index = "ModuleID"
rs.Seek "=", mdl
If DCount("func", "tblSysRightUserRight", "uname='" & LogUser & "' and func='" & mdl & "'") = 0 Then
glMessageBox "你没有权限使用这个功能!"
Exit Sub
End If
Exit Sub
OC_Err:
glMessageBox "tellme" & Err.Description
Exit Sub
End Sub
|
|