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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report won't print

Status
Not open for further replies.
Jul 6, 2005
52
GB
I have a report whose control source is set with the OnOpen event like so:

me.RecordSource = sqlstr

The report previews fine but doesn't print. Strangely, if I try to print it from the database window using the right click print command, it prints. Anyone know what's happening here and how to get it to print?
 
barrysprout
Two questions...
1. Where is the Open event picking up the sqlstr from? From a form?

2. Is there any chance that whatever provides the sqlstr is being closed before the Print is issued?

Tom
 
The sql string is part of the OnOpen event. It's just a simple query and there isn't any other code associated with the report. The report is opened from a form with a date criterion and the form remains open until you quit the report.

I've managed to get round the problem by printing the report from the form but it's not ideal. I would rather print the report from a menu while it is in Preview mode. From a brief search on the net, I notice this is a problem encountered by others but I haven't found a solution yet.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top