"Snoopy33" <ho********@hotmail.comwrote in message
news:75**********************************@f63g2000 hsf.googlegroups.com...
>
I've removed the api call and the modal and pop up settings so
that it opens windowed. This didn't resolve the problem. It still
flashes up with a print dialog like it's spooling to the printer and
then it goes away without printing.
To summarize so far:
- One specific report fails to print (or preview?) when opened with
DoCmd.OpenReport, but works when fired directly from the NavPane.
- This only happens in A2007 (even with SP1), but on several machines. Other
reports print fine on those machines.
- The problem occurs regardless of the window mode (normal or dialog), and
you tested this without hiding the main Access window.
You mentioned DAO 3.6. That's the correct library to use with an MDB; you
only use acedao with ACCDB format.
Presumably you have already tried stuff like a compact, decompile, compact
sequence, such as:
http://allenbrowne.com/recover.html
It might be worth recreating the report with SaveAsText/LoadFromText also
(link above), and setting minimal references.)
I'm also assuming we don't have multiple users opening the one database here
(i.e. each user has a separate front end.)
The next step would be to eliminate the things that could be affecting its
opening, e.g.:
- Is the report's FilterOnLoad property set to No?
- Is there anything in the report's Open or NoData events that could cancel
it?
- If there are subreports, temporarily remove them to see if the main report
opens.
- Set its HasModule property to No (after saving any code), an clear the
event properties of the report and its sections (particularly the Open,
Load, Activate, Resize, Filter, Timer events of the report, and the Format
and Print events of its sections.)
Especially, be suspicious of anything that reassigns the RecordSource of the
report and/or it's subreports.
If the problem persists, the next layer down is the source data:
RecordSource query, RowSource for controls, timing of the creation of any
temporary records, and so on.
Let's know if any of that is productive.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.