A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to open report 'elegantly' if nothing to show.



 
 
Thread Tools Display Modes
  #1  
Old January 8th, 2010, 02:20 AM posted to microsoft.public.access.reports
ThomasAJ
external usenet poster
 
Posts: 91
Default How to open report 'elegantly' if nothing to show.

DoCmd.OpenReport "ABC"

When query behind it has nothing in it the report just flashes (or at least
its window does).

Can something be put in the OPEN/LOAD event that can cause an elegant
OpenReport.

--
Regards
Tom
  #2  
Old January 8th, 2010, 02:23 AM posted to microsoft.public.access.reports
Allen Browne
external usenet poster
 
Posts: 11,706
Default How to open report 'elegantly' if nothing to show.

Cancel the NoData event of the report.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"ThomasAJ" wrote in message
news
DoCmd.OpenReport "ABC"

When query behind it has nothing in it the report just flashes (or at
least
its window does).

Can something be put in the OPEN/LOAD event that can cause an elegant
OpenReport.

--
Regards
Tom


  #3  
Old January 9th, 2010, 12:22 AM posted to microsoft.public.access.reports
David W. Fenton
external usenet poster
 
Posts: 3,373
Default How to open report 'elegantly' if nothing to show.

"Allen Browne" wrote in
:

Cancel the NoData event of the report.


....and add an error handler to the bit of code where
DoCmd.OpenReport was called (you'll want to ignore error 2051).

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:27 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.