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

What causes my report to popup and disappear immediately? 3

Status
Not open for further replies.

steve728

Programmer
Mar 16, 2003
536
US
When calling a report from a form, it pops up and disappears immediately. I even added a 5 sec delay and still no luck. I checked the data that was processed and all is well. Any ideas. The form's module property is set to yes and so I changed it to no and still no go.

STeve
 
Do you have any code in the report? What is the code in the form that opens the report?

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Its also possible that the button on the form which contains the command which opens the report, possibly also contains some code which closes the report. So ... as Duanne suggests, check the code on the report to see if it closes the report, but also check any further code associated with the button on the form, to see if perhaps it is responsible for closing the report.


Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)
 
Hi

I have also had this happen to me when using a report based on a query, where that query was based on another query, and an error occured in the 'second level' query (invalid use of null in my case), no error messages were displayed, the report just flashed on the screen and then closed.

have you tried running the underying query on which the report is based, using same criteria ?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Look in your code for a DoCmd.Close statement. A common mistake is to not specify the object you want to close. When this happens, the active window is closed, which at this point is probably the report window.

Hoc nomen meum verum non est.
 
Thank you all Cyber buddies. I found the obvious error.
I just panicked. At the end of the click event (after the call to the report) is a DoCmd.Close. That'll do it everytime. Thank you for help!!!!

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top