Solved

MS Access report row count

Posted on 2004-11-02
848 Views
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
0
Question by:colin_palmer
    3 Comments
     
    LVL 77

    Accepted Solution

    by:
    Hello colin_palmer,

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

    Pete
    0
     
    LVL 1

    Author Comment

    by:colin_palmer
    That works a treat. thanks
    0
     
    LVL 77

    Expert Comment

    by:peter57r
    Great news.
    Thanks.

    Pete
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
    I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
    With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

    875 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

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now