Solved

Create Form Header/Footer In VBA

Posted on 2001-07-19
5
954 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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.

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now