[AccessD] Question about SubForms

Arthur Fuller artful at rogers.com
Tue Dec 28 16:36:04 CST 2004


Beauty! Thanks, my fave Dane!

Arthur

Gustav Brock wrote:

>Hi Arthur
>
>This works here:
>
>Private Sub Form_Open(Cancel As Integer)
>
>  If IsSubform() Then
>    Me.Section(acHeader).Visible = False
>  End If
>
>End Sub
>
>However, I don't test for Me.Parent:
>
>Private Function IsSubform() As Boolean
>
>  Static booSubform     As Boolean
>  Static lngFormsCount  As Long
>
>  If lngFormsCount = 0 Then
>    lngFormsCount = Forms.Count
>    booSubform = StrComp(Forms(lngFormsCount - 1).Name, Me.Name,
>vbTextCompare)
>  End If
>
>  IsSubform = booSubform
>      
>End Function
>
>/gustav
>  
>
>  
>


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.298 / Virus Database: 265.6.5 - Release Date: 12/26/2004




More information about the AccessD mailing list