?
Solved

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

Posted on 2011-03-09
3
Medium Priority
?
287 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 2000 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 learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Suggested Courses

777 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