UtterAccess HomeUtterAccess Wiki

Welcome Guest ( Log In | Register )

Custom Search
Edit Discussion
> IsSubform    
See Also: IsParentForm


Synopsis

This function can be used to identify if a form is instantiated as a subform.

From your form's code, call it like this:

CODE
If IsSubform(Me) Then
   ' Do stuff.
End If

CODE
' IsSubform
' http://www.utteraccess.com/wiki/IsSubform
' Code courtesy of UtterAccess Wiki
' Licensed under Creative Commons License
' http://creativecommons.org/licenses/by-sa/3.0/
'
' You are free to use this code in any application,
' provided this notice is left unchanged.
'
' rev  date                          brief descripton
' 1.0  2013-05-11                    
'
Public Function IsSubform(ByRef frm As Form) As Boolean

   On Error Resume Next
   IsSubform = Me.Parent.hWnd
   
End Function

Creative Commons License
IsSubform by UtterAccess Wiki is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Editing and revision of the content is freely encouraged; for details, see Expected Usage.

Edit Discussion
Custom Search
Thank you for your support!
This page has been accessed 7,740 times.  This page was last modified 16:59, 11 May 2013 by Gustav. Contributions by Jack Leach  Disclaimers