I've writtema macro that executes a stored procedure as well as writing the stored procedure.
Here's the SP in my VBA
DoCmd.OpenStoredProcedure "dbo.change_mrn_alltables_sp"
the procedure is :
Alter PROCEDURE dbo.Change_MRN_AllTables_SP @OLD_MRN_TO_BE_CHANGED varchar(25) , @NEW_MRN varchar(25)
AS
update accountstbl set MRN = @NEW_MRN where mrn = @OLD_MRN_TO_BE_CHANGED
When I run I get message:
RUN TIME ERROR "2001"
You cancelled the previous operation
I'm lost and spent over 5 hours on this>
If I run as macro executing the stored procedure the code is...
DoCmd.RunMacro "change_mrn"
and the macro executes the stored procedure BUT I get message
Action Failed
Condition = True
Action name:Openstoredprocedure
Arguments: dbo.change_mrn_alltables_sp,print preview,edit
Please help!
Here's the SP in my VBA
DoCmd.OpenStoredProcedure "dbo.change_mrn_alltables_sp"
the procedure is :
Alter PROCEDURE dbo.Change_MRN_AllTables_SP @OLD_MRN_TO_BE_CHANGED varchar(25) , @NEW_MRN varchar(25)
AS
update accountstbl set MRN = @NEW_MRN where mrn = @OLD_MRN_TO_BE_CHANGED
When I run I get message:
RUN TIME ERROR "2001"
You cancelled the previous operation
I'm lost and spent over 5 hours on this>
If I run as macro executing the stored procedure the code is...
DoCmd.RunMacro "change_mrn"
and the macro executes the stored procedure BUT I get message
Action Failed
Condition = True
Action name:Openstoredprocedure
Arguments: dbo.change_mrn_alltables_sp,print preview,edit
Please help!