演示效果:
示例代码:
Private Sub Command0_Click()
If IsLoaded(acForm, "窗体1") Then
MsgBox "窗体1已打开"
Else
MsgBox "窗体1未打开"
End If
End Sub
Private Sub Command1_Click()
If IsLoaded(acTable, "表1") Then
MsgBox "表1已打开"
Else
MsgBox "表1未打开"
End If
End Sub
Private Sub Command2_Click()
If IsLoaded(acQuery, "查询1") Then
MsgBox "查询1已打开"
Else
MsgBox "查询1未打开"
End If
End Sub
Private Sub Command3_Click()
If IsLoaded(acReport, "报表1") Then
MsgBox "报表1已打开"
Else
MsgBox "报表1未打开"
End If
End Sub
更加全面的函数介绍,可以参照《盟威软件快速开发平台》在线帮助中心:
http://www.accessgood.com/help/Main.html