Solved

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

Posted on 2011-03-09
3
277 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 - Access MVP) 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now