Solved

Create Form Header/Footer In VBA

Posted on 2001-07-19
5
963 Views
Last Modified: 2008-03-10
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??
0
Comment
Question by:regodab
  • 2
  • 2
5 Comments
 
LVL 7

Accepted Solution

by:
Nosterdamus earned 200 total points
ID: 6298803
Hi regodab,

Use:

Forms!MyForm.Section(acHeader).Visible = True

Change MyForm to the real name of your form.

Hope this helps,

Nosterdamus
0
 
LVL 7

Expert Comment

by:Nosterdamus
ID: 6298806
Sorry,

Forms!MyForm.Section(acHeader).Visible

Will do...

Nosterdamus
0
 
LVL 8

Expert Comment

by:DennisBorg
ID: 6298882
regodab:

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

   DoCmd.RunCommand acCmdFormHdrFtr

-Dennis Borg
0
 

Author Comment

by:regodab
ID: 6301429
This does work but not quite in my situation, I have reposted the question with more details.

Thanks
0
 
LVL 8

Expert Comment

by:DennisBorg
ID: 6308664
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
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question