I have spent a long time trying to get one of my stored procedures on SQL server to be called from my program at startup.
The stored procedure does not return a recordset, so Access produces an error saying the procedure cannot be run.
What I did was add one line to the start of te storedprocedure:
"SELECT 0"
This makes it a select query so you can select it as the forms recordset. Any other commands in the form can come after the SELECT line and they will be executed.
If you wanted to run the stored proc from a button, you could create a new form with the proc as the recordsource to popup with a message along the lines of "Please Wait... Calculating" then close itself.
I havnt tried this myself, but my stored proc is on my main menu and runs fine on startup.
The stored procedure does not return a recordset, so Access produces an error saying the procedure cannot be run.
What I did was add one line to the start of te storedprocedure:
"SELECT 0"
This makes it a select query so you can select it as the forms recordset. Any other commands in the form can come after the SELECT line and they will be executed.
If you wanted to run the stored proc from a button, you could create a new form with the proc as the recordsource to popup with a message along the lines of "Please Wait... Calculating" then close itself.
I havnt tried this myself, but my stored proc is on my main menu and runs fine on startup.