|
SynopsisThis 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
|
| This page was last modified 15:28, 27 April 2011. This page has been accessed 524 times. Disclaimers |