Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reports printing with toolbar button problem

Status
Not open for further replies.

Tarnish

Technical User
Nov 13, 2006
221
US
Hi all,

I think this is mostly happening with my reports, but it may not be so limited...

When I try to print a report using a print button on a toolbar (in this case, a custom toolbar), I'm almost always getting a print of a form that's sitting 'under' the report I'm trying to print. If I use control-P, it works fine.

The form in question doesn't have any non-zero timer event (which was the basis for what some termed a 'bug' in access that caused the very problem I'm having), so it's not that.

Any other suggestions to get the print button on my toolbar printing the right (top) 'window' (report) instead of some underlying form?

Thanks,
T
 
Tarnish
This is just a shot in the dark.

Have you tried minimizing the form that is 'under' when the Print routine is called, and then restoring the form when the report is closed?

Tom
 
How are ya Tarnish . . .

Could be a number of reasons why.

Is your print button a copy of the system button or your own which runs a function?

Calvin.gif
See Ya! . . . . . .
 
Thanks for the responses.

Hiya Ace: The print button is just the standard system print button. It's on a customized toolbar that is part of my application.

Thanks,
T
 
I think I found the solution messing around some more trying to get TH's suggestion.

It's probably something everyone else knows already, but my forms were set to pop-up: yes, modal: no and it turns out (I think) they need to be set to just the opposite: popup: no, modal: yes.

Set the old way, every time I hit the print button the report was losing focus. I added some code to the form that was printing instead to minimize it (and added code to the report's on_close event to restore the other form), but then it just printed the 'switchboard' form instead which is ALWAYS up.

Bottom line, I think I have it working. Thanks a lot for the suggestions. They led me to where I needed to get.

T
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top