Are you asking if you can assign a condition to a control on a form? If so,
the answer is "yes". Here are the steps I took to do this.
Open one of your modules in the Visual Basic window and enter a new function
for calling the macro. I named mine CallMacro. Here's the code I used:
Function CallMacro ( strMacro as String, bFlag as Boolean)
If bFlag Then
DoCmd.RunMacro strMacro
End If
End Function
Now, open the form in design view, make sure the properties window is
displayed, and click on the control. In the OnClick event, click the event
builder button (the one with the three dots) and choose Expression Builder.
Enter the following:
=IIf(<CONDITION>,CallMacro(<MACRO_NAME>, True),CallMacro("", False))
Simply substiture your condition and your macro name for the <CONDITION> and
<MACRO_NAME> above, and give it a try.
HTH