Thank you for your support!    
UtterAccess HomeUtterAccess Wiki

Welcome Guest ( Log In | Register )

Edit Discussion
> IsSubform    
See Also: IsParentForm


Synopsis

This simple function can be used to identify if a form instances is currently implementated 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/index.php/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  2011-04-27                    
'
Public Function IsSubform(frm As Form) As Boolean
 On Error Resume Next
 Dim x As String
 x = frm.Parent.Name
 If Err.Number = 0 Then
   IsSubform = True
 Else
   IsSubform = False
 End If
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
This page was last modified 15:28, 27 April 2011.  This page has been accessed 524 times.  Disclaimers