aziz rasul
09-18-2008, 01:03 AM
When I run code by pressing the Run toolbar button from a module, everything is OK. However if I run the code via a macro using the RunCode, the routine is run OK but it crashes at the end of the process.
has anyone come across this before?
nIGHTmAYOR
10-02-2008, 05:59 PM
if you already have tried compact/repaire and creating new db >> importing all your objects to it and the problem persisted , post the code it might be your real problem.
aziz rasul
10-03-2008, 02:46 AM
I created a new DB and imported all the objects and it's OK now. Thanks.
nIGHTmAYOR
10-03-2008, 06:09 AM
glad to help , above technique for ms access is quite like restart for computers when they go crazy on you :)
The_Doc_Man
10-03-2008, 06:15 AM
One thing that might be different, though ...
RunCode as a macro requires that the code is a function, not a subroutine, because the macro manager wants to test the return status.
Run from the toolbar doesn't have that limitation, I think. So you can run a subroutine that returns nothing.