[AccessD] Determine if a subform is open

Shamil Salakhetdinov shamil at smsconsulting.spb.ru
Sat Jul 12 11:47:06 CDT 2003


Arthur,

Something like that should work:

Public Function IsSubformOpen( _
                 ByVal vstrFrmName As String, _
                 ByVal vstrFsubCtlName As String) _
                 As Boolean
On Error GoTo HandleErr
    IsSubformOpen = _

(Len(Access.Application.Forms(vstrFrmName).Controls(vstrFsubCtlName).Form.Na
me) > 0)
HandleErr:
End Function

HTH,
Shamil

----- Original Message -----
From: "Arthur Fuller" <artful at rogers.com>
To: "AccessD" <AccessD at databaseadvisors.com>
Sent: Saturday, July 12, 2003 7:39 PM
Subject: [AccessD] Determine if a subform is open


> I have a function IsOpen(frmName as String) that returns true if a given
> form is open. However, I can't seem to make it work for a subform. Given
> Colby-style JIT subforms, it's likely that a particular subform is not
> actually open yet. How can I tell?
>
> TIA,
> Arthur
>
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com



More information about the AccessD mailing list