Link to home
Start Free TrialLog in
Avatar of regodab
regodab

asked on

Create Form Header/Footer In VBA

From the answers I have received, I think this extra fact might be important. I am tring to do this from another database using the access.application object.

For other properties I am using:
set frm = objaccess.forms(doc.name)
frm.recordselectors = false

when I do frm.section(formfooter).visible = true it just runs the code without error but doesn't do the job.

I am writing some code to open a form in design view and do certain formating. One thing I have come stuck on is doing the equivelant of 'Show Header/Footer' and then adding a control to the footer. If I manually show it I can then control it using code but I can't get it to show from code. Any Suggestion??
ASKER CERTIFIED SOLUTION
Avatar of Nosterdamus
Nosterdamus
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry,

Forms!MyForm.Section(acHeader).Visible

Will do...

Nosterdamus
Avatar of DennisBorg
DennisBorg

regodab:

Issuing the following command should toggle the form's header/footer:

   DoCmd.RunCommand acCmdFormHdrFtr

-Dennis Borg
Avatar of regodab

ASKER

This does work but not quite in my situation, I have reposted the question with more details.

Thanks
regodab:

>This does work but not quite in my situation, I have
>reposted the question with more details.

What is "This"? More than one person had submitted a solution, so your reference to "this works but not quite in my situation" is quite ambigious.

It would be far better to submit a post explaining how "this" did not quite work for your situation so that we could submit solutions better suited for your situation.

Could you please at least provide a link to your "new" question?


-Dennis Borg