Full Version: Formatted report not working withOUT detail OnFormat
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
pere_de_chipstick
I have a report which is designed for producing a credit card style photo pass.

The report can be formatted in various differrent ways - different backgrounds / fonts / colours / control positions
etc which is carried out in the detail on format event.

The user can also select which printer the reports are printed on (if not the default printer) and set paper size, margins, and orientation.

For the different orientations (Portrait / Landscape) I need two different reports, however the controls in the
portrait style report are fixed, and hence do not need the Detail On Format event.

If I preview either report before printing they print fine; If I print the landscape format report directly (without previewing) it prints fine, however if I print the the portrait format directly it prints the current FORM!

Even if I make a direct copy of the working (landscape format) report and remove the 'Event Procedure' from the
properties, with NO other changes, then this prints the form crazy.gif .

I have resolved the problem by including the detail on format event in the portrait report and setting the control
postions to their current position.

But why does this happen, what is going on?

Am I missing something in the way I am creating / formatting / printing the reports which I ought to be aware of?

Thanks in anticipation (and bewilderment!)
pere_de_chipstick
Hi all

I have managed to resolve, (from another post on UA), I had missed a line in my code;
After the open report command, there should be a select object command, so
CODE
DoCmd.OpenReport strSelRpt, acViewPreview, , stLinkCriteria, acHidden, strArgs
[color="blue"]DoCmd.SelectObject acReport, strSelRpt  [/color]
Thanks to all who've taken the time to look over this for me. uarulez2.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.