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!

Maximise Report using code - not working properly

Status
Not open for further replies.

jojones

Programmer
Dec 4, 2000
104
AU
I am trying to Maximise a Report on Open. The On Open Procedure assigns the RecordSource and changes a few label colours etc. The I have the line

DoCmd.Maximise

What actually happens is, the form which has the command buutton to open the report gets maximised instead of the report. I think this is due to the fact that the query behind the report takes a little while to run... but not sure. Can anybody help and suggest an alternative for Maximising my report.

:) Cheers
Jo Jones
 
You might try throwing the

Docmd.Maximize in the OnActivate event of the report. That might correct your problem.

Hope this helps....
 
Jo:

I issue the DoCmd.Maximise immediately after the DoCmd.OpenReport on the calling form:

DoCmd.OpenReport stDocName, acPreview
DoCmd.Maximize

This works for me.
Larry De Laruelle
larry1de@yahoo.com

 
Larry - unfortunately that is what I am doing, but it keeps maximising the calling form before the report opens in preview, I think due to the time it takes for the Reports recordsource query to run.

Merry Christmas - thanks for your suggestions Cheers
Jo Jones
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top