• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 294
  • Last Modified:

MS Access Error: This action or method equires a Module or Procedure Name argument.

The event calls the module.function successfully but after the control is passed back to the event code it returns this error:

"This action or method equires a Module or Procedure Name argument."

Here is the Code:

Private Sub Command15_Click()
On Error GoTo Err_Command15_Click

    'EPM Check Post Process Status
    'DoCmd.OpenQuery "EPM_PROD_Get_IBIS_Success_Totals_By_Date"
   
    DoCmd.OpenModule (Module1.ParamSPT2("2011-03-02"))
   

Exit_Command15_Click:
    Exit Sub

Err_Command15_Click:
    MsgBox Err.Description
    Resume Exit_Command15_Click
End Sub
0
psueoc
Asked:
psueoc
  • 2
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Try replacing

DoCmd.OpenModule (Module1.ParamSPT2("2011-03-02"))

with

Call ParamSPT2("2011-03-02")

assuming ParamSPT2 is the name of the Function (?) ...

mx
0
 
psueocAuthor Commented:
That's it you got it!

Thanks for your help.
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
I've never used that other syntax - so I don't know the issues it may have.  I like Call because it explicitly lets me know I'm referencing a Function.

mx
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now