Hello,
I am trying to run a macro in that was created in an earlier version of access but getting an error message when i try to run it in 2007. The error occurs on the DoCmd.RunMacro "M_Report2007.C onsumerMoSalesR " , 1 line. Below is the VB scripting and error message. not sure if i need to create individual macro modules to be able to complete the commands but any help is appreciated.
ERROR:
Run-time Error '2501':
The RunMacro action was cancelled.
(END) (DEBUG)
CODE:
I am trying to run a macro in that was created in an earlier version of access but getting an error message when i try to run it in 2007. The error occurs on the DoCmd.RunMacro "M_Report2007.C onsumerMoSalesR " , 1 line. Below is the VB scripting and error message. not sure if i need to create individual macro modules to be able to complete the commands but any help is appreciated.
ERROR:
Run-time Error '2501':
The RunMacro action was cancelled.
(END) (DEBUG)
CODE:
Code:
Private Sub Cancel_Click()
DoCmd.Close
End Sub
Code:
Private Sub Form_Open(Cancel As Integer) 'If Not bInReportOpenEvent Then ' If we're not called from the report 'MsgBox "For use from the Sales Goals Report only", vbOKOnly 'Cancel = True 'End If 'Form_Open_Exit: 'Exit Sub End Sub
Code:
Private Sub OK_Click()
If (Eval("[Forms]![F_Sales_Month DialogC].[CMonthC] Is Null")) Then
' is MISSING !
Beep
MsgBox "Current Month Value is MISSING ! Please Enter...........", vbOKOnly, ""
Exit Sub
End If
If (Eval("[Forms]![F_Sales_Month DialogC].[NMonthC] Is Null")) Then
' is MISSING !
Beep
MsgBox "Next Month Value is MISSING ! Please Enter...........", vbOKOnly, ""
Exit Sub
End If
Me.Visible = False
DoCmd.RunMacro "M_Report2007.ConsumerMoSalesR", 1
End Sub
Comment