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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Range of records, displaying first and last numbers in footer

Status
Not open for further replies.

bjzielinski

IS-IT--Management
Nov 8, 2001
93
US
I thought this report would be simple to set up, but apparently I am missing something here. I have a simple table of receipts, and I want to print from receipt X to the end of the table. I want a line at the bottom that says "This report covers receipts X though Y". I put an inputbox in the Report_Open subroutine to ask for the starting number, then set my recordsource to a SQL statement for RECNO > X. When I run the report, it asks for the starting receipt number, but then nothing happens, no print preview, nothing. What is wrong? Also how do I get the Y number, the last receipt number? Bill Zielinski
bzielinski@co.midland.mi.us
County of Midland, Michigan
 
Unless you have an extremely large data set try getting the report to work without a filter. Once this is OK try adding the following in the open event:

Me.Filter = "[RECNO] >= " + Cstr(X)
Me.FilterOn = True

In the report footer put two text boxes with source:

=Max([X])

and

=Min([X])

Best Regards,
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top