While in query design, go View > Conditions to make the Conditions
column visible (unless already visible). In this column, you enter a
condition for Access to evaluate, and the action next to it is executed
only if the condition evaluates to True. If you enter a condition in a
row, all subsequent rows with ... (three dots) in the conditions column
will only be executed if the condition above is true, so the ... symbol
actually extends the condition to subsequent rows. So, to do what you want:
The condition you need is:
DCount("*","TableName") = 0
Put the first action to execute if empty next to it, and ... in all
subsequent rows for actions to execute if empty; add a last one with a
StopMacro action. Then, add the actions to execute if not empty, without
any condition. The result is that if empty the first set executes then
the macro stops, otherwise the first set is skipped and the second
(unconditional) set executes.
HTH,
Nikos