Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Macros / December 2006

Tip: Looking for answers? Try searching our database.

Macro condition Select Object

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
eye59 - 28 Dec 2006 00:03 GMT
I have a macro that selects several reports to run, after they run I change
the focus via SELECT OBJECT as a way to size the reports specifically so that
multiple reports are visible on the screen.  In some cases, when there is no
data the reports will not run.  I have a no data macro set up for that.    
How do I setup a condition in the select object line of the macro that tells
the macro IF there is NO report skip this step?  

Thanks
Steve Schapel - 28 Dec 2006 05:00 GMT
Eye,

One way would be to test the query that the report is based on, if it
returns any records.  In other words, the Condition of the macro action
would be like this...
 DCount("*","YourQuery")>0

Signature

Steve Schapel, Microsoft Access MVP

> I have a macro that selects several reports to run, after they run I change
> the focus via SELECT OBJECT as a way to size the reports specifically so that
[quoted text clipped - 4 lines]
>
> Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.