Try the following function:
Function HeaderExists(WhichForm As Form) As Boolean
On Error Resume Next
HeaderExists = WhichForm.Section(acHeader).Visible
If Err.Number = 2462 Then
Err.Clear
Else
Err.Raise Err.Number, "HeaderExists", Err.Description
End If
End Function
Inside a form, you'd call this as
If HeaderExists(Me) Then
MsgBox "This form has a visible header"
Else
MsgBox "This form does not have a visible header"
End If
From a module, you can use HeaderExists(Forms!NameOfForm)
The form must be open for the function to work.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> Hi everybody,
>
> How can I examine if a form has Header/Footer with code ?
>
> Greatly appreciate any help.
> Thank you.
Using VBA function - the following code is not fully tested, but it should
give you the idea.
Public Function HasHeader(frmAny As Form) As Boolean
Dim TfAny As Boolean
On Error GoTo HasHeader_Error
TfAny = frmAny.Section(acHeader).Visible
HasHeader = True
Exit Function
HasHeader_Error:
HasHeader = False 'Error 2462
End Function

Signature
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.
> Hi everybody,
>
> How can I examine if a form has Header/Footer with code ?
>
> Greatly appreciate any help.
> Thank you.
Sreedhar - 30 Jan 2007 14:41 GMT
Thanks Doug and Thanks John,
That works.

Signature
Sreedhar