VBA function in module corrupted

Local time
Today, 19:55
Joined
Jan 12, 2013
Messages
6
Have any members experienced this happening.
You change some code in a main module function. Then when you step through it in debug it starts jumping lines of code and going to called routines that you have just changed the code to stop it doing. Clicking on a variable to see the value produces nothing.
The way I have got round it is either by 'copying' the function into memory deleting the code and then re-pasteing it , or importing everything into a new mdb file. I use MSACCESS 2003.
If this is a common problem and REPAIRING doesn't fix it I'd be interested to know what other people do to fix the problem.
 
Even if it is working perfectly, before I release a database I always do a decompile and a compact before generating the compiled version.

I have added both Compact and Decompile as separate commands on the Explorer context menu for mdb and accdb files.
 
Thanks for your advice which I will now set up.
Just one thing when I go into Debug it says Compile db2 where db2 is apparently the project name. I think this was the original name that msaccess 2003 allocated to the mdb file which I have since renamed to RTI.mdb. Does this matter ?
 
Another cause of this type of behaviour is to have a timer running on a form - this can cause jumping around such as you describe.
 
Just one thing when I go into Debug it says Compile db2 where db2 is apparently the project name. I think this was the original name that msaccess 2003 allocated to the mdb file which I have since renamed to RTI.mdb. Does this matter ?

No it doesn't matter. However you can edit the name if you want.

Open the Properties Window (under the VBA editor's View menu or hit F4). Click on the project heading and change the name property.
 
Many thanks to pbaldy for those links. You have saved my life.
 
Happy to help and welcome to the site!
 

Users who are viewing this thread

Back
Top Bottom