473,320 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

page breaks, printing and vba

hey... i have a report that groups on salespeople. the report footer is a
three part summary of the store's total data with 2 different departments for
parts 1 and 2 and a store total for part 3. part of the form that creates
the report is the ability to select a specific department. it is when that
happens, that i need 2 of the 3 parts of the report footer to be
visible=false. now i've got that working but here's the real problem.

there's a page break inbetween each of the 3 parts in the report footer.
when the unwanted section goes visible=false, the final report has 2 blank
pages. i tried having the page breaks go visible as well (thus preventing
the page from breaking) but the size of the report footer is so big that it's
not all on one page.

basically my report footer is 13.25 inches long
part 1 starts at 0 inches and is about 4.25 inches long with the page break
at 4.375 inches.
part 2 starts at 4.375 inches and is about 4.25 inches long with the page
break at 8.875 inches.
part 3 starts at 8.875 inches and is about 4.25 inches long with no page
break needed at the end.

if the page breaks are untouched, pages 6 and 7 of the report are blank when
parts 1 and 2 are visible=false and part 3 prints on page 8.

if the page breaks go visible=false with parts 1 and 2, page 6 is blank, page
7 has 95% of part 3 on it, only with a HUGE margin and page 8 has the last
line of part 3 on the very top of the page.

my code for the parts is (don't know if you need to know this or not):

Dim ctlCurr As Control
Dim usedctrls As Boolean
Dim newctrls As Boolean

usedctrls = IsNull(Forms!formquerybuilder.Controls!cboxdepartm ent)
newctrls = IsNull(Forms!formquerybuilder.Controls!cboxdepartm ent)

For Each ctlCurr In Me.Controls
If ctlCurr.Tag = "usedcontrols" Or ctlCurr.Tag = "newcontrols" Then
ctlCurr.Visible = usedctrls
End If
Next ctlCurr

i know it sounds incredibly anal of my to type out all the measurements and
all but i couldn't think of a better way to describe what was happening and
make it coherent.

any suggestions?

--
Message posted via http://www.accessmonster.com
Jan 10 '06 #1
1 2522
Monsieur Unhelpful here - check your page margins. I'm not entirely
sure what you're trying to do because I really just scanned your post.
I've found that extra blank pages usually have something to do with the
margins being off a bit. Your situation seems to involve dynamically
changing the report length, though, so my suggestion may be completely
worthless.

Jan 10 '06 #2

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

Similar topics

48
by: David J Patrick | last post by:
I'm trying to rewrite the CSS used in http://s92415866.onlinehome.us/files/ScreenplayCSSv2.html. using the w3.org paged media standards as described at http://www.w3.org/TR/REC-CSS2/page.html ...
0
by: James | last post by:
We have a page that reads records from a database and displays them. Basically name/address/city/state/zip/county/phone. These records are between 4-6 lines a piece (there are other variables...
5
by: Hemanth | last post by:
Hello there, I'm trying to read an excel worksheet (with more than 5000 rows and 30 columns) using PHP. I'm using the "excelreader" script I found over the web -...
2
by: moondaddy | last post by:
I have a page that I'm making for the sole purpose of printing and this page makes 1.5 printed pages. Is there a way to force a print page break at a specific place so when the user prints the...
8
by: CJM | last post by:
What is the best way to force a page break when printing from a browser? A page in my application generates a series of tables which are usually less than will fit on a page of A4. Ideally I want...
4
by: Ed Jay | last post by:
I generate a DHTML page (a medical report) with dynamically generated text based on user input (answers to questions). The page length changes dynamically. I desire that when the page is printed...
4
by: evll | last post by:
Hello! I need to print two pages using PrintDocument, but there are some problems. I've got something like that: -button is pressed -two pages need to be printed The code is like that:
8
by: Lauren Quantrell | last post by:
I know I can user vbcrlf to generate a linefeed when exporting text. Is there a way to force page breaks in the exported text using VBA?
7
by: =?Utf-8?B?aXdlYg==?= | last post by:
Can we set page breaks in ASP Pages dynamically based on the data being populated? Akshay.
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.