Private Sub Command24_Click()
'Sub ShowUserRosterMultipleUsers()
Dim cn As ADODB.Connection '原句有加NEW
Dim cn2 As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim i, j As Long
intObjState = SysCmd(acSysCmdGetObjectState, "ACFORM", "TEST")
If intObjState <> 0 Then
'如果表單TEST沒有開啟,則.....
'INTOBJSTATE 為 1 表示開啟,0表示未開啟,2表示變更未儲存,4表示新增....
.
.
.
End If