The never ending report, it goes on and on and on

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Access 2000 SP3

Can anyone recommend a way round this odd problem.

I've got an Access report which print preview's the first page ok (it is
only 1 page long), but the next pages are blank, and its never ending, it
goes on and on. It should be 1 page, not 9999999999999999999etc

One thing I've noticed which fixes the problem, is when print previewing the
report, click on page setup and simply select ok and this sorts the page, it
goes from being never ending to being one page again and I can print 1 page.

So, does anyone know how maybe I can use vba to go "page setup --> ok", but
without having the screen updating.
Or maybe by using vba to simply set the orientation and the margins or
something similar that would cause whatever happened to fix the problem to
occur….

I've tried google, but no joy, has anyone got any suggestions or...

Thanks.
 
I never heard of that, but the first thing I would try is Repair and compact
to the mdb, if you didn't try it already
 
Sorry, I was a bit sparse on the important bits like:

Its an .adp (hooked up to SQL Server 2000 SP3a) NOT an mdb

The report was generated from a working Form, by clicking save_as on the
Form to convert it to a Report.

The record source for the report is a sproc, which I've checked and does
only return 1 record.

I can try re-creating the report, maybe re-importing all objects to a new
..adp.
But what was interesting was by simply clicking File --> Page Setup --> OK,
it sorted the problem.

I had the report open in print preview, and I can use the record navigation
buttons to go left 100's of pages. Then with the report still in print
preview, click File --> Page setup, and without changing any values, just
click ok, and the report seems to visibly refresh itself for a split second,
and the record navigation buttons grey out as it reverts to what it should be
which is one record long.
What I was hoping, as a workaround, is to trigger the page setup and click
ok, but without the user even knowing about it, especially as we need to be
able to use the docmd.outputTo command and run off 100's of single page
reports, I dont want to click ok 100's of times or give the user an epyleptic
fit! :)

Thanks for any other idea!
 
Make certain you are fully up-to-date with Service Packs on both Access and
SQL Server.

My personal solution would be to (1) not use ADP, if I had the choice, (2)
try compact and repair, (3) re-create the report manually -- the error could
have been introduced by the "save as report" code in Access. A last-ditch
effort would be to create a new empty database, import all the objects
except the failing report, then re-create the report manually.

Larry Linson
Microsoft Access MVP
 
Back
Top