Solved

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

Posted on 2011-03-09
3
283 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

749 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