Form code stops working

  • Thread starter Thread starter davea
  • Start date Start date
D

davea

I have a form which I am trying to make simple changes to (i.e. label
colours and text formatting). Whenever I try to make changes access
hangs and won't save anything resulting in me crashing out completely.
The form is quite complicated with lots of subforms.



I have tried exporting the form to a new file, making the changes
there and then importing it back into the main system. The changes
save sucessfully but whenever I click on a control which has code
behind it the debbugger pops up with a "Compile error" message saying
Method or member not found. The old version of the form still works
fine and the code is exactly the same in both. I know the export has
probably caused it but I don't know how to fix it.



Have I missed something obvious?



Access version 2003 running in 2000 format for this database.
 
m:
Have I missed something obvious?

You probably need to decompile, compact, and then import everything
into a new database. You seem to have serious corruption of the VBA
project.

Once you've done that, you need to use better practices to insure
things don't corrupt:

1. turn off COMPILE ON DEMAND.

2. add the COMPILE button to your VBE toolbar and compile regularly,
after every few lines of code.

3. periodically decompile/compact to clean out any problems that may
have accumulated. I do this after a day's coding on any project, or
before a new release.
 
Back
Top