Phil Stanton wrote:
Can anyone help please
I have created a form using
Dim Frm as form
Set Frm = CreateForm()
This gives me a basic form with just the Detail section created.
Without using a template how can I add a Form Header & Footer.
It should be something like
Dim MySection as Section
Set MySection = CreateSection(Frm.Name, acheader, Height, Width)
but there does not appear to be anything like it in AK2
nor in A97.
Sub SetFormHeader(F As Form, bSwitchOn As Boolean)
Dim S As Section
On Error Resume Next
Set S = F.Section(acHeader)
If bSwitchOn Then
'if error, add
If Err > 0 Then
RunCommand acCmdFormHdrFtr
End If
Else
'if no error, remove
If Err = 0 Then
RunCommand acCmdFormHdrFtr
End If
End If
End Sub
--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea