Number entries on an Access Report

By mzrax ·
Here's one for you. I've searched the internet hi and low and yet I haven't found anyone that has come accross this problem when it comes to Access Reports. Any Help would be much appreciated.

Here goes.....

I have a table/query that produces EmpID, LastName, Initials returning 165 entries. That's the simple part.

Here's where I'm stumped.

I can produce a report that prints out the following:

EmpID LastName Initials
1 2839 Jones JK
2 2309 Edwards GE
3 2387 Collins TR
164 2980 Robbins JW
165 2312 Goyle AD

I can make the numbers grow on the left hand side using a textbox =0+1 and RunningSum property to Over Group or Over All and it just numbers the adds one to the number over 4 or 5 pages.

This is not what I want.

Is there a way to set up a report to make the numbers start from 1 on the left hand side on every new page so that if sized properly only shows about 25 records per page and the left hand side number shows how many are on the page. Then on page two the numbers on the left hand side start out with 1 to 25 and so on.

I have tried this many ways even trying to cheat using Word (not my first choice). I would really like to keep everything in Access. I even tried to do it with an SQL query and trying insert/join a new column that recounts every 25 records so that using the control source property but it didn't work.

So basically I'm trying to have a page that always shows 1 to 25 on the list of every page even if there's no record beside it. I'm trying to make it look like this

EmpID LastName Initials
1 2839 Jones JK
2 2309 Edwards GE
3 2387 Collins TR
25 2365 Taylor BR

EmpID LastName Initials
1 2723 Doyle TY
2 2692 Murray NC
3 2487 Heinz WS
25 2432 Brennan BM

I am also trying to do a very similar thing for invoices where there will only be about 15 lines to enter items and each one has to be numbered starting with 1-15 on each and every page and not 1 to infinity.


This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Use the modulus operator

by Tony Hopkinson In reply to Number entries on an Acce ...

on the count

26 mod 25 is 1
52 mode 25 is 2

Modulus is remainder after integer division.

Collapse -

Nice idea, but ...

by Bizzo In reply to Use the modulus operator

25 mod 25 is 0

Not sure about the syntax of Access, but you need something along the lines of:

number = ((count - 1) mod 25) + 1

Collapse -

I'm a 1 based person myself

by Tony Hopkinson In reply to Nice idea, but ...

The zeroth stuff, confuses me.

Related Discussions

Related Forums