[AccessD] Form Header/Footer - adding by code

Bruce Bruen bbruen at bigpond.com
Sun Feb 9 19:07:00 CST 2003


Thanks Michael,

Thats exactly what I needed - again A2K help fails when needed.

Bruce

-----Original Message-----
From: accessd-admin at databaseadvisors.com
[mailto:accessd-admin at databaseadvisors.com]On Behalf Of Michael R Mattys
Sent: Monday, February 10, 2003 2:56 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Form Header/Footer - adding by code


Hi Bruce

Sub NewForm()
    On Error GoTo NewForm_Error
    Dim frm As Form

    ' Create form based on Customers form.
    Set frm = CreateForm(, "zzNewForm")
    DoCmd.Restore
    With frm
        If frm.Section(1) = True Then
            'test existance
        End If
    End With
    Set frm = Nothing
    Exit Sub
NewForm_Error:
    If Err.Number = 2462 Then
        DoCmd.RunCommand acCmdFormHdrFtr
    End If
End Sub

Mike Mattys

----- Original Message -----
From: "Bruce Bruen" <bbruen at bigpond.com>
To: "AccessD" <accessd at databaseadvisors.com>
Sent: Sunday, February 09, 2003 5:59 AM
Subject: [AccessD] Form Header/Footer - adding by code


> I have a bunch of forms that I need to standardise.  Some have headers,
some
> don't.
>
> Is there any way to test if the form header section exists via code and if
> not then make it exist?
>
> I have tried looping through the form.section(x)'s, testing the visible
> property but it fails as soon as the header doesn't exist.
>
> But even if I can test it, I cant see how to make it exist via code?
>
> tia
> Bruce
>
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com

_______________________________________________
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