Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to display the first record and last record in a page of a report?

Status
Not open for further replies.
Sep 15, 2002
3
SG
Say for example I have a set of records in the database with a running serial number for every record.

For every page (or the footer of the page), I need to display the serial number that indicate the first and the last record IN A PAGE. (assuming each page has a maximum of 25 records)
Eg. A000001 - A000025 (to be displayed in the footer of page 1)
A000026 - A000050 (to be displayed in the footer of page 2)
A000051 - A000060 (to be displayed in the footer of page 3, assuming that page 3 has only ten records)

Can somebody help me...coz I'm a newbie in MS Access.

Cheers!

 
dim rs as dao.recordset


set rs = me.recordsetclone
rs.movefirst
msgbox rs![SerialField]
for i = 1 to 24
rs.movenext
next i
rs![SerialField]

repeat the above in a loop

This is a crude way to do it. You may well run across a more elegant method later. Chose 'one' way first.

rollie@bwsys.net
 
Hi Rolliee,

Thanks for your kindly response but i think this method won't work cause the serial number are those assigned duting the report runtime and not from the database?

My problem is how can I keep track the first and last serial number and display on the page footer on each page?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top