以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=71246)

--  作者:飞云
--  发布时间:2015/7/8 8:08:00
--  [求助]
Dim lvw As WinForm.ListView = e.Form.Controls("ListView1")
If lvw.Current IsNot Nothing  Then
    If Forms.Contains("\'" & lvw.Current.Text & "\'") Then
        Forms("\'" & lvw.Current.Text & "\'").Open()

    Else
        MessageBox.Show( "《" & lvw.Current.Text & " 》模块正在设计中......","提示")
    End If
End If

请问代码有什么问题吗?窗口存在,可是打不开,为什么。

--  作者:大红袍
--  发布时间:2015/7/8 9:07:00
--  

如果是主窗口,就必须先切换表。

 

Dim lvw As WinForm.ListView = e.Form.Controls("ListView1")
If lvw.Current IsNot Nothing  Then
    If Forms.Contains("\'" & lvw.Current.Text & "\'") Then
        MainTable = Tables("表A")
        Forms("\'" & lvw.Current.Text & "\'").Open()
    Else
        MessageBox.Show( "《" & lvw.Current.Text & " 》模块正在设计中......","提示")
    End If
End If


--  作者:飞云
--  发布时间:2015/7/8 11:59:00
--  
好的,谢谢了,可是我用模式窗口也不行,不知道为什么。
[此贴子已经被作者于2015/7/8 12:00:08编辑过]

--  作者:大红袍
--  发布时间:2015/7/8 12:07:00
--  

If Forms.Contains("\'" & lvw.Current.Text & "\'") Then

 

改成

 

If Forms.Contains(lvw.Current.Text) Then