This one has me baffled.

I'm printing a form with the below code:

Click image for larger version. 

Name:	230425.jpg 
Views:	10 
Size:	28.6 KB 
ID:	50150

Before printing, everything on the form is set to remove colors to B&W.
If I run the code with the breakpoint, it prints in B&W (using F5).
If I remove the breakpoint, the form prints in color (looking at the form, it is in B&W with the breakpoint)!

I've tried a lot of options for the DoCmd.SelectObject and DoCmd.PrintOut
and this seems to be the only one that works close to correctly, except for the color peculiarity.

I thought the sleep might help, but it doesn't, only the breakpoint being set.



As best as I can tell, the breakpoint limits printing to the active form page in the Access pane, but without the breakpoint, the form as it "exists" in its entirety (as an object?), but not shown is used (if that makes sense). Using false as the third argument in the DoCmd.PrintOut inhibits the printing (the printer makes some noise as if it got something, but the form itself doesn't print).

It's a complicated program, so it's not easy to make a demo, but I'll try if the answer isn't obvious to someone that knows about this stuff.