Steve,
I have one more scenario I'd like help with,
A Monthly Data Table containing a field Named [Balance].
I want to cancel a specific Macro if the Sum of [Balance] = 0
I tried this statement, but it does not work:
DCount("*","Transactions-New","Sum([Balance])")=0
Ron
"Steve Schapel" wrote:
> Ron,
>
> Use the Condition of the macro action for this.
>
> In the first scenario, the Condition the equivalent of:
> DCount("*","NameOfYOurTable")>0
>
> In the second scenario, the Condition the equivalent of:
> DCount("*","NameOfYOurTable","[YourYesNoField]<>0")>0
>
> --
>
> Steve Schapel, Microsoft Access MVP
>
>
> "Ron" <(E-Mail Removed)> wrote in message
> news:867FB1BF-E7B1-4122-81F7-(E-Mail Removed)...
> > In a Macro, I want to check if a specified table is empty. When it's
> > empty, I
> > want to Cancel a Macro from running.
> >
> > Another situation:
> > A Table containing Data with a Yes/No field to represent Open/Closed
> > Projects.
> > I want to cancel a specific Macro if ALL the records are Closed.
> > i.e. If running a query to display all open Items, No Data is Returned...
> >
> >
>
|