"else" condition

  • Thread starter Thread starter Omar
  • Start date Start date
O

Omar

Thanks for taking your time to read and respond to my
question, I appreciate it.

How do I set a condition in a macro that allows me to set
a creteria that if none of the previous conditions are met
then show a message box. This condition would be like an
ELSE statement in C-Language.
THanks
 
Omar,

I regret to say that this is sometimes an awkward thing to do in a
macro.

Sometimes you can manage it by using the StopMacro action, for
example...

Condition Action
FirstCondition FirstAction
.... OtherFirstAction
.... StopMacro
2ndCondition 2ndAction
.... Other2ndAction
.... StopMacro
3rdAction
Other3rdAction

In this case the macro only ever reaches the stage of 3rdAction if
1stCondition and 2ndCondition are not met.

In other cases, you have to specifically enter the condition to
exclude the others. For example...
Condition1: a>b
Condition2: a>c
Condition3: a>d
Condition4: b>=a And c>=a And d>=a

- Steve Schapel, Microsoft Access MVP
 
Back
Top