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.