473,327 Members | 2,016 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,327 software developers and data experts.

Page numbering conundrum

I have a peculiar page numbering problem in a Microsoft Access 2003 database that I created for distributing weekly invoices to our customers.

The report has the following sections:
Page Header
Invoice Number Header
Product Number Header
Detail
Product Number Footer
Invoice Number Footer
Page Footer
Report Footer

All the heading information including invoice details and page number of invoice are in the Page Header section of the report as I want this information to print at the top of every page and not just when the invoice number changes.

When the invoice footer is printing, I run a macro that resets the page number back to zero which works just fine.

My problem is this.....

If the 1st invoice in the group of invoices for the customer is a multiple page invoice, the page numbering goes 1...3...4...5, etc.

If the 1st invoice in the group is a single page, then any subsequent mult-page invoices are numbered correctly.

This only occurs when the 1st invoice is multi-page.

I've tried everything in my limited knowledge of Access to fix this problem with no success.

Has anyone out there also encountered this problem?
Any help would be greatly appreciated.

Thanks,
Kelly
May 24 '11 #1

✓ answered by NeoPa

The problem was nothing to do with anything you've told us about resetting page numbers for the invoices. That's all set up perfectly correctly.

The problem was with the TextBox control [Text78] that you used for displaying the page number in your Page Header (BTW. using meaningful names for your objects is well worth the hassle. Working with [Text78] will not make life easy for you). You had the property .RunningSum set to "Over Group". It was within a multi-page invoice so it added 2 to the previous value (1) and got 3. I expect you maight have figured what was going on had you had any invoices stretching over more than two pages. If you set that property back to "No" it will work for you perfectly (It certainly did for me).

9 3666
NeoPa
32,556 Expert Mod 16PB
Kelly, We need all the details of what you are doing with the page numbering in any of the sections you are using.

Another thing to check is the section titled Reset page numbers for each group in a report in Access Help. This covers the basics of the subject.
May 24 '11 #2
Thank you for the advice, Neopa.
Following are more details.

My page number is in the page header so I have created a macro to reset the page number to 0.

I have set the ForceNewPage property to Before Section in the Invoice Number Group Header.

I have set the OnFormat property of the Invoice Number Group Footer to the name of my macro that resets the page number.

I am getting the same results.

I'm attaching a copy of the output so you can see what I'm talking about.

I can also send a copy of the Access database if necessary.

Again, thank you for taking the time to help me with this.

Kelly
Attached Files
File Type: zip MultiPageInvoices.zip (27.8 KB, 159 views)
May 25 '11 #3
NeoPa
32,556 Expert Mod 16PB
Kelly,

It seems you are doing exactly as instructed, and I can't see from this what is causing the problem. It may be an idea to attach your database for me to have a look at. I use only Access 2003 at this point (See point #1 below).

I know the Help section includes instructions for using macros to reset the numbering. Personally I never recommend use of macros as VBA code is better in all respects. It's an MS cop-out in my view. That said, it should still work adequately.

The following paragraphs are general instructions for attaching a database to your post when requested. Not all are relevant in all circumstances but please check through and do as many as do make sense. A properly prepared attachment can save a lot of otherwise wasted time and effort.

When attaching your work please follow the following steps first :
  1. Remove anything not relevant to the problem. This is not necessary in all circumstances but some databases can be very bulky and some things do not effect the actual problem at all. If it is irrelevant to the problem under review and particularly if it takes up a lot of space (increases the size of the attachment that needs to be stored and downloaded) then it makes sense to remove it before upload.
  2. Likewise, not entirely necessary in all cases, but consider saving your database in a version not later than 2003 as many of our experts don't use later versions yet. Access 2003 was a solid and reliable version and subsequent ones are perceived to offer little extra, while changing the operator interface only cosmetically. The expert requesting the database should sensibly indicate their own preference if they have one.
  3. If the process depends on any linked tables then make local copies in your database to replace the linked tables.
  4. If the database includes any code, ensure that all modules are set to Option Explicit (See Require Variable Declaration).
  5. If you've done anything in steps 1 to 4 then make sure that the problem you're experiencing is still evident in the updated version.
  6. Compile the database (From the Visual Basic Editor select Debug / Compile {Project Name}).
  7. Compact the database (Tools / Database Utilities / Compact and Repair Database...).
  8. Compress the database into a ZIP file.
  9. When posting, scroll down the page and select Manage Attachments (Pressing on that leads you to a page where you can add or remove your attachments. It also lists the maximum file sizes for each of the allowed file types.) and add this new ZIP file.
  10. NB.
    It is very important to include some instructions that enable us to find the issue you'd like help with. Maybe some instructions of what to select, click on, enter etc that ensures we'll see what you see and have the same problems.

PS. Attaching a database without a prior request to do so is generally seen as a desire to save yourself the trouble of explaining your problem properly and clearly. It is unlikely to encourage our experts to spend time on your problem.
May 25 '11 #4
Neopa,

Unfortunately, I'm an RPG programmer and know just enough to be dangerous as far as Visual Basic so I try to take advantage of the code Access has to offer rather than invent any of my own.

I'm attaching a zipped copy of the database.

If you will go to the reports section and choose
"SelectSpecficCustomerCurrentYear"

Customer # is 70522200

And then key a date range in...

5/20/11 to 5/20/11 will give you an example of the multi-page invoices.

And, again, many thanks!
Kelly
Attached Files
File Type: zip ARInvoicesForBytes.zip (357.3 KB, 147 views)
May 25 '11 #5
NeoPa
32,556 Expert Mod 16PB
Just a quick note to say I'll get to this when I have some spare time Kelly.

While I'm about it, I'm surprised RPG is still around. RPGII was the first language I worked in commercially in 1979.

Anyway, I'll post here later when I've had a chance to look at your database in more detail.

PS. May I say how nice it is to work with people who can follow instructions. Good job.
May 25 '11 #6
NeoPa
32,556 Expert Mod 16PB
The problem was nothing to do with anything you've told us about resetting page numbers for the invoices. That's all set up perfectly correctly.

The problem was with the TextBox control [Text78] that you used for displaying the page number in your Page Header (BTW. using meaningful names for your objects is well worth the hassle. Working with [Text78] will not make life easy for you). You had the property .RunningSum set to "Over Group". It was within a multi-page invoice so it added 2 to the previous value (1) and got 3. I expect you maight have figured what was going on had you had any invoices stretching over more than two pages. If you set that property back to "No" it will work for you perfectly (It certainly did for me).
May 25 '11 #7
Neopa,

Of course this worked beautifully!
And, I would never have even suspected that this was the problem.

Thank you...thank you...thank you!

Now, when my customers ask me to send them the missing page 2, I won't have to explain that I couldn't count. There really will be a missing page 2!

I can't begin to tell you how many hours I've spent trying to fix this and you probably managed it in about 5 minutes!

Many thanks again,
Kelly
May 26 '11 #8
NeoPa
32,556 Expert Mod 16PB
No Kelly. This wasn't a simple issue at all. I think I took at least half an hour to find this one. It confused me until I realised it was probably nothing directly to do with the resetting of the number for each invoice. That was the break-through. Then it was just a question of looking through the properties for one that didn't ring true, and I knew there were only a few of those that were even worth looking at.

I'm very pleased to have helped anyway.

(Goes away with a strange feeling Kelly may deliberately send an invoice with page #2 missing just for the fun of being able to explain later how it was merely a clerical error :-D)
May 26 '11 #9
Hahahahahahahahahah....I may just do that!
May 26 '11 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: will | last post by:
Hope someone can help me here, as I can't find the answer anywhere. I'm printing documents using XML and XSL:FO. The documents are double-sided. I want to number the pages so that the physical...
2
by: Elasho | last post by:
I have a report that groups data on an Area, the report is set to force a new page for each Area within the report. Each Area will have 1 or more pages. Is it possible to make the page...
1
by: Simon | last post by:
Dear reader, Most of the reports have a page numbering as Page x of nn, starting at the first page 1 (one) to the last page nn. But know I need to start with Page 1 of nn for each...
1
by: KelHemp | last post by:
So, I've set up a manual page numbering system, bound to the field "LeaseNumber" AfterUpdate, to keep track of how many records I have of each single lease number. It works, but if you go back and...
3
by: joelpollock | last post by:
I'm having trouble continuously page numbering a large report in MS Access. The report is made up of three separate Access reports which I join together at the end. In the past I have opened the...
0
by: jimratajski | last post by:
Can anyone tell me how to automate page numbering of spawned page templates in Acrobat? I have a number of forms containing hidden page templates that I would like to be auto numbered as they are...
2
by: booher | last post by:
I need help generating a PDF output where the page numbering restarts at 1 with every new chapter in a document. So the output would look something like 1-1, 1-2, 1-3,..., 2-1, 2-2, 2-3,... I'm...
3
by: RS | last post by:
I have an ASP.NET page that I want to print with customized page number instead of taking the default from IE. How can I control the page numbers in ASP.NET? Thank you.
7
by: Reedsp | last post by:
I have a report that displays the page numbering incorrectly. Example page 1 of 3 but only 2 pages are displayed when previewing or printing the report. Here is the details: Page footer - text...
0
by: EdH DOT | last post by:
Hello. The issue is with an existing Access file (been used for over a year). It was working fine, then suddenly, many of the reports (8 of 11) started showing “#Name?” in page numbering field...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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
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.