Run a "macro" in a module

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!
 
Macros can only run functions, not subs.

Change it to

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