By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,398 Members | 1,351 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,398 IT Pros & Developers. It's quick & easy.

inspecting whether a form is open

P: n/a
Hi.
How to check whether some form is open or not, in VBA ?
Thanks.
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Zlatko,

'----------------------------
Function IsLoaded(ByVal strFormName As String) As Boolean
' Returns True if the specified form is open in Form view or Datasheet
view.

Const conObjStateClosed = 0
Const conDesignView = 0

If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <>
conObjStateClosed Then
If Forms(strFormName).CurrentView <> conDesignView Then
IsLoaded = True
End If
End If

End Function
'--------------------------
Bill E.
Hollywood, FL

Nov 13 '05 #2

P: n/a
Hi!.
Thanks again:)

<bi********@netscape.net> je napisao u poruci interesnoj
grupi:11**********************@o13g2000cwo.googleg roups.com...
Zlatko,

'----------------------------
Function IsLoaded(ByVal strFormName As String) As Boolean
' Returns True if the specified form is open in Form view or Datasheet
view.

Const conObjStateClosed = 0
Const conDesignView = 0

If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <>
conObjStateClosed Then
If Forms(strFormName).CurrentView <> conDesignView Then
IsLoaded = True
End If
End If

End Function
'--------------------------
Bill E.
Hollywood, FL

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.