Solved

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

Posted on 2011-03-09
3
282 Views
Last Modified: 2012-05-11
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
Comment
Question by:psueoc
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 500 total points
ID: 35086940
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
 

Author Closing Comment

by:psueoc
ID: 35086959
That's it you got it!

Thanks for your help.
0
 
LVL 75
ID: 35087225
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question