473,699 Members | 2,702 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Do Page Header - Page Footer exist

My boss wants the font on reports to be user selectable on a
Configuration screen. I open the Font Dialog and one is selected.
When the report opens, I call a funtion that changes the font of all
Text Boxes and Labels. I need to go through the collection of each
section of the report: Report Header, Report Footer, Page Header, et
cetera. I use this code:
'
*************** *************** *************** *************** *************** ****
' Set the Report Font based on the passed information 04/23/06
Public Sub SetReportFont(C alling As Report, PassedFontName As String)
On Error GoTo ErrorReport

Dim ctl As Control
Dim ThisType As Long
Dim SectionMode As Integer

For Each ctl In Calling.ReportH eader.Controls
ThisType = ctl.ControlType
If ((ThisType = acTextBox) Or (ThisType = acLabel)) Then
ctl.FontName = PassedFontName
End If
Next

For Each ctl In Calling.ReportF ooter.Controls
ThisType = ctl.ControlType
If ((ThisType = acTextBox) Or (ThisType = acLabel)) Then
ctl.FontName = PassedFontName
End If
Next
And so on. The problem is that some reports may not have a page
header or footer or some other section. Is there a way that I can tell
if the passed report has a particular section before I try to loop
through its collection? I'm using Access 2000.
Thanks,
Hank Reed

Apr 23 '06 #1
1 2170
Hank wrote in message
<11************ **********@i39g 2000cwa.googleg roups.com> :
My boss wants the font on reports to be user selectable on a
Configuration screen. I open the Font Dialog and one is selected.
When the report opens, I call a funtion that changes the font of all
Text Boxes and Labels. I need to go through the collection of each
section of the report: Report Header, Report Footer, Page Header, et
cetera. I use this code:
'
*************** *************** *************** *************** *************** ****
' Set the Report Font based on the passed information 04/23/06
Public Sub SetReportFont(C alling As Report, PassedFontName As String)
On Error GoTo ErrorReport

Dim ctl As Control
Dim ThisType As Long
Dim SectionMode As Integer

For Each ctl In Calling.ReportH eader.Controls
ThisType = ctl.ControlType
If ((ThisType = acTextBox) Or (ThisType = acLabel)) Then
ctl.FontName = PassedFontName
End If
Next

For Each ctl In Calling.ReportF ooter.Controls
ThisType = ctl.ControlType
If ((ThisType = acTextBox) Or (ThisType = acLabel)) Then
ctl.FontName = PassedFontName
End If
Next
And so on. The problem is that some reports may not have a page
header or footer or some other section. Is there a way that I can
tell if the passed report has a particular section before I try to
loop through its collection? I'm using Access 2000.
Thanks,
Hank Reed


I am not sure at all, but I don't think this is exposed. (I'd love to
be
proven wrong on that). I think I'd try brute force, as in for instance

on error resume next
debug.print calling.section (acPageHeader). controls.count
if err.number <> 0 then
' probably doesn't exist
err.clear
else
' loop the controls
end if

But I'd advice to be carefull when referring to the report sections.
See the following thread for why (watch for linebreaks in the link)
http://groups.google.com/group/comp....018f1b65acea7e

--
Roy-Vidar
Apr 23 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4472
by: Tristan Miller | last post by:
Greetings. I have a two-column web layout, where the first column is just the regular body text with a "marign-right" of 16em, and the second column is an "absolute"-positioned div with a width of 16em. I would like to have a footer extending across the entire width of the page, at the very bottom of the page (i.e., after both columns end). How can I do this? There is no way of knowing in advance which of the two columns will be...
5
5376
by: Niyazi | last post by:
Hi, I have an html page and I might be moving to asp.net page that contains a some kind of forum and string. It is kind of application form. User have to enter some (string) value into the forum which forum actualy similar to small article. Then user have to use PRINT button to print the page. My problem is that when I try to print it prints the HTML Name on top left as well as the page
0
1891
by: Niyazi | last post by:
Hi all, This my aspx page first line of code. <%@ Page CodeBehind="index.aspx.vb" Language="vb" AutoEventWireup="false" Inherits="TB.index" %> Than inside head tag I have following script(s) --------------------------------------------------------------------------------------------------------------------- <script language="JavaScript"> //Disable Mouse Right Click Button
7
6868
by: Robert Adkison | last post by:
I need to print a web page. It is my preference that my users just do a File/Print from explorer. That way my users will get the print dialog that will allow them to select the fax printer. The only problem with doing this is that a header (name of the page and Page x of x) and footer (actual page filename the date) are included. I am proficient with using Crystal Reports v10 (developers version) which will create a PDF file for you to...
13
14927
by: Greg | last post by:
Most suggestions on this topic recommend to use a page footer and make it visible only on the last page. My problem is that the footer is half of the height of a page which means the detail would show on only the top half of each page with whitepace at the bottom of each page. How can I get the detail to fill each page with my "half page height" report footer at the bottom of the last page? Any suggestions to solve this would be...
8
13530
by: Amit | last post by:
I have a master page and a content page but the stylesheet isnt getting applied like how it looks in visual studio design view. The master page is defined like this: <%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
1800
by: Michael | last post by:
Hey everyone, Is it possible to automatically insert headers/footers using mod_python? I will be not be using PSP's, so I cannot use the PSP/include solution. Furthermore, the header will be dynamic; it won't be a static HTML page. In short, I've been looking for a page layout facility using mod_python.
13
1943
by: Dan Aldean | last post by:
Hi, I use ASP.NET 2.0 and I created a stylesheet, but I don't know how to make it visible to a web form "MyWebPage.aspx" that uses the master page. I put a reference to the css in the .master but it's not visible to the newly created page. MyWebPage.aspx doesn't have a <head> <link rel="stylesheet" type="text/css" href="mystyle.css" /> </head>structure.
2
2908
by: Simon | last post by:
Dear reader, In case a report is a sub report the Report Header of the sub report is printed in the report but the Page Header of the sub report will not be printed. This is the same for Page Footer of the sub report. Is there a possibility to force printing Page Header and Page Footer of a sub report.
0
8685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8613
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9032
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8880
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7745
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4374
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.