Run a "macro" in a module

J

Jeff

Hi,

I wrote some code in "Module1" in the Modules tab in access.
Here is what I wrote

Option Compare Database

Sub SetOff()
DoCmd.SetWarnings = False
End Sub

This just sets the warnings off.

My question is - how do I run this from the "Macros" tab.

I tried "OpenModule" and then set the procedure = "SetOff"

But this did not work.

Thanks for your help!
 
D

Douglas J. Steele

Macros can only run functions, not subs.

Change it to

Function SetOff()
DoCmd.SetWarnings = False
End Function
 
Top