form header/footer

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi

Is there a way to turn the Header/footer from a form on and off using VBA
code?

thanks
Steve
 
try
me.HeaderSectionName.visible=False ' Or True
Or FooterName

If you run it not from the form then
Forms![FormName].HeaderSectionName.visible=False ' Or True
 
hi

It doesn't work because I've got no formheader/footer made in the form.
I won't to make it just like you do in the menu bar but then with the help
of VBA.

Not turn it visible

Any suggestions?

Steve


"Ofer" schreef:
try
me.HeaderSectionName.visible=False ' Or True
Or FooterName

If you run it not from the form then
Forms![FormName].HeaderSectionName.visible=False ' Or True

steve said:
hi

Is there a way to turn the Header/footer from a form on and off using VBA
code?

thanks
Steve
 
Then create the form header and footer, when you open it in design view,
select on the toolbar, view, form header and footer, and now using the vba I
wrote in the earlier post, hide it if you dont need it.

steve said:
hi

It doesn't work because I've got no formheader/footer made in the form.
I won't to make it just like you do in the menu bar but then with the help
of VBA.

Not turn it visible

Any suggestions?

Steve


"Ofer" schreef:
try
me.HeaderSectionName.visible=False ' Or True
Or FooterName

If you run it not from the form then
Forms![FormName].HeaderSectionName.visible=False ' Or True

steve said:
hi

Is there a way to turn the Header/footer from a form on and off using VBA
code?

thanks
Steve
 
hi

That’s what I won't to do with vba Code = "select on the toolbar, view, form
header and footer"
I'm making an addin that makes controls in to a form but not every form
starts off with a header/footer so to catch this I need to make one.

help?

Steve


Public Sub sbKnoppenAanmaken(FormulierNaam As String)
Dim intKnop As Integer
Dim strKnop(4, 5) As String
Dim objKnop As Object
Dim objfrm As New Access.Form

'De knoppen opslaan in een array
strKnop(0, 0) = "cmdNieuw": strKnop(0, 1) = "&Nieuw": strKnop(0, 2) =
fnkTwips(0.2): strKnop(0, 3) = fnkTwips(0.2): strKnop(0, 4) = fnkTwips(2):
strKnop(0, 5) = fnkTwips(0.7)
strKnop(1, 0) = "cmdOpslaan": strKnop(1, 1) = "&Opslaan": strKnop(1, 2) =
fnkTwips(2.2): strKnop(1, 3) = fnkTwips(0.2): strKnop(1, 4) = fnkTwips(2):
strKnop(1, 5) = fnkTwips(0.7)
strKnop(2, 0) = "cmdToevoegen": strKnop(2, 1) = "&Toevoegen": strKnop(2, 2)
= fnkTwips(4.2): strKnop(2, 3) = fnkTwips(0.2): strKnop(2, 4) = fnkTwips(2):
strKnop(2, 5) = fnkTwips(0.7)
strKnop(3, 0) = "cmdVerwijderen": strKnop(3, 1) = "&Verwijderen": strKnop(3,
2) = fnkTwips(6.2): strKnop(3, 3) = fnkTwips(0.2): strKnop(3, 4) =
fnkTwips(2): strKnop(3, 5) = fnkTwips(0.7)
strKnop(4, 0) = "cmdSluiten": strKnop(4, 1) = "&Sluiten": strKnop(4, 2) =
fnkTwips(8.2): strKnop(4, 3) = fnkTwips(0.2): strKnop(4, 4) = fnkTwips(2):
strKnop(4, 5) = fnkTwips(0.7)


!!!!!Checks if a header or footer exists otherwise make one!!!!!
code

'Na kijken of de knoppen al bestaan en zoniet ze aanmaken
For intKnop = 0 To 4
Set objKnop = CreateControl(FormulierNaam, acCommandButton, acFooter, ,
, strKnop(intKnop, 2), strKnop(intKnop, 3), strKnop(intKnop, 4),
strKnop(intKnop, 5))
objKnop.Name = strKnop(intKnop, 0)
objKnop.Caption = strKnop(intKnop, 1)
Next intKnop
DoCmd.Restore

Set objKnop = Nothing
End Sub


"Ofer" schreef:
Then create the form header and footer, when you open it in design view,
select on the toolbar, view, form header and footer, and now using the vba I
wrote in the earlier post, hide it if you dont need it.

steve said:
hi

It doesn't work because I've got no formheader/footer made in the form.
I won't to make it just like you do in the menu bar but then with the help
of VBA.

Not turn it visible

Any suggestions?

Steve


"Ofer" schreef:
try
me.HeaderSectionName.visible=False ' Or True
Or FooterName

If you run it not from the form then
Forms![FormName].HeaderSectionName.visible=False ' Or True

:

hi

Is there a way to turn the Header/footer from a form on and off using VBA
code?

thanks
Steve
 
Back
Top