I have a good one, here is the code I am trying to run:
This is the error I get:
Run-time Error'2520':
The action or method requires a Module or Procedure Name Argument.
It goes on to say that I tried to use the openmodule action or method without providing a module name. When clicking Debug, it highlights the name of the module in the code! I have checked to see if the name is correct, it is. Running Access 97 on XP. Any suggestions?
EDIT: Also, instead of opening the code window, it runs the module?
Thanks, Ken.
Code:
Dim MsgTxt As String, Response As Variant
If Not IsCompiled() Then
MsgTxt = "The program file is currently in an uncompiled state" & vbCrLf
MsgTxt = MsgTxt & "This can result in severe performance problems." & vbCrLf
MsgTxt = MsgTxt & "Would you like to compile the program file?"
Response = MsgBox(MsgTxt, vbYesNo + vbQuestion, "Performance Check")
If Response = vbYes Then
'DoCmd.Echo False
DoCmd.OpenModule (AddTMF)
DoCmd.SelectObject acModule, AddTMF
RunCommand (acCmdCompileAndSaveAllModules)
RunCommand (acCmdCompactDatabase)
RunCommand (acCmdRepairDatabase)
DoCmd.Close acModule, AddTMF
'DoCmd.Echo True
MsgTxt = "The program file has been compiled."
Response = MsgBox(MsgTxt, vbInformation, "Compile Completed Successfully")
End If
End If
This is the error I get:
Run-time Error'2520':
The action or method requires a Module or Procedure Name Argument.
It goes on to say that I tried to use the openmodule action or method without providing a module name. When clicking Debug, it highlights the name of the module in the code! I have checked to see if the name is correct, it is. Running Access 97 on XP. Any suggestions?
EDIT: Also, instead of opening the code window, it runs the module?
Thanks, Ken.