setup dialog

  • Thread starter Thread starter gr
  • Start date Start date
G

gr

hello,

I'm changing a reports width during the Open event
(Previous post). by debugging I can check that the report
width is changed but physically the report opens with the
previous report width. If I open the Page setup dialog and
close it (no changes just click Ok) the report is format
again and the new width is "refreshed". What's actually
happening when clicking Ok on the Page set up dialog? How
can I do this "refresh width" by code so that the report
opens with the proper width without opening the Page setup
dialog?

thx.
 
Gr:

You can't change report properties like width etc reliably in the On open
event. By the time that that event fires, Access has already queried the
print and report set up parameters. The only way to reliably change the
report width and printer parameters is to open the report first in design
mode in your code, change the width and then send to print. The Open
event simply fires too late in the process Access currently uses.
 
Back
Top