Go Premium for a chance to win a PS4. Enter to Win


MS Access report row count

Posted on 2004-11-02
Medium Priority
Last Modified: 2013-11-28
Hi Experts,

Subject: MS Access 2000 Reports

In the Detail_Format event I have the following code:

i = i + 1
txtValue.Value = i

This then identifies the row number on the report, which works.

However, I noticed that on some pages (not all) the number in the txtValue text box jumps by two numbers.
For example on page 1 it counts 1 to 23, then on page 2 it counts from 25 to 49 (Following on from some pages is fine). Whats happened to 24?

I do have grouping, however the first two pages are within the same group.

Another problem - if I view the report and then print it, page 1 starts from the number the count ended from when it was previewed. So if there are 100 rows and I print it after previewing it, the count will start from 101. Is there anyway to reset this.  I tried putting i=0 in the report activate event but nothing happened.

Please help
Question by:colin_palmer
  • 2
LVL 77

Accepted Solution

peter57r earned 1000 total points
ID: 12471310
Hello colin_palmer,

Use the Print event.  The format event fires twice in many situations.


Author Comment

ID: 12471363
That works a treat. thanks
LVL 77

Expert Comment

ID: 12471403
Great news.


Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

916 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