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

Group Page Numbers

Ok, right now I have some code that is printing the "page of pages"
for individual groups in my report. This code has worked in other
reports, so I put it in this report. It is however, not doing it
properly. It seems like it is predicting the size of the groups
improperly due to a field that can grow, and grow quite a bit. What's
happening is the field 'Me.Funct' when printed is different, however
the code sees it the same as before, until a couple pages later.

The following code is in the PageFooter_Format event:

Expand|Select|Wrap|Line Numbers
  1. Dim I As Integer
  2. If Me.Pages = 0 Then
  3. ReDim Preserve GrpArrayPage(Me.Page + 1)
  4. ReDim Preserve GrpArrayPages(Me.Page + 1)
  5. GrpNameCurrent = Me.Funct
  6. If GrpNameCurrent = GrpNamePrevious Then
  7. GrpArrayPage(Me.Page) = GrpArrayPage(Me.Page - 1) + 1
  8. GrpPages = GrpArrayPage(Me.Page)
  9. For I = Me.Page - ((GrpPages) - 1) To Me.Page
  10. GrpArrayPages(I) = GrpPages
  11. Next I
  12. Else
  13. GrpPage = 1
  14. GrpArrayPage(Me.Page) = GrpPage
  15. GrpArrayPages(Me.Page) = GrpPage
  16. End If
  17. Else
  18. lblFunctPage.Caption = "Page" & " " & GrpArrayPage(Me.Page) & " of
  19. " & GrpArrayPages(Me.Page)
  20. End If
  21. GrpNamePrevious = GrpNameCurrent
Mar 26 '08 #1
0 1226

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

Similar topics

3
by: ChrisRath | last post by:
I have a table that I want to have a precalulcate length on a character field and group and sum up. Thought I could do this by creating a view with a group by clause that includes the sum...
19
by: What-a-Tool | last post by:
I have a school project (ASP) in which I have to call three different ASP pages from three different and identical (except for the form "action", obviously) HTM pages. This I have no problem with....
2
by: Will | last post by:
I have a 1 page report which I want to print numerous copies of. The number of copies will be specified by the user. My problem is that I want each report to print the copy number of number of...
6
by: Greg Collins [InfoPath MVP] | last post by:
I couldn't find what I was looking for doing a search through the newsgroup, so here goes... I'm have a Web site user registration confirmation page that I want to show a set of random numbers...
5
by: jacob.dba | last post by:
I have a table with first name, last name, SSN(social security number) and other columns. I want to assign group number according to this business logic. 1. Records with equal SSN and (similar...
2
by: john | last post by:
In groupheader in my report I would like to have a page count like "1 of 3" independent from the report's page count (every new item in the group starts on a new page). So the group that start on...
19
by: aa | last post by:
when I ourput data from Access, numbers bigger than 999 are shown with letter "B" inserted into the 4th position left to the coma. (in my w2k regional settings I have the decimal dot separator set...
1
by: zafm86 | last post by:
Hi everyone! I'm sure my problem is pretty easy to solve but I've been working on it for a long and my my brain is not working correctly anymore. I'm working with an AS400 and I mhave to do an...
2
by: EORTIZ | last post by:
I have a report in which is grouped by a variable. The number of pages per group varies. I need to include the page number for each group, so it resets after each group.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.