Command Buttons/Macros

D

David Clifford

I have a command button on a form which is currently used to launch a macro,
But I want it instead to launch either one of two macros based on a value for
another field on the same form. Any help would be greatly appreciated
 
B

BruceM

I use VBA procedures for most things, and do not have much experience with
macros. Since you haven't provided any details I will assume you are
checking the value of a number field. In that case I believe your command
button's Click event would go something like this:

If Me.YourField < 10 Then
DoCmd.RunMacro "Macro1"
Else
DoCmd.RunMacro "Macro2"
End If
 
Top