Cannot save after editing event proc with cut/copy and paste

Alan Chan

Registered User.
Local time
Today, 16:06
Joined
Aug 28, 2013
Messages
14
I have encountered several times, and now, that after using any "cut and paste" or "copy and paste" on VBA code in the event sub, even for a few words, Access does not allow me to exit when I answer 'Yes' to save the changes. It forces me to respond "No" to exit and re-enter any changes again without using copy or cut and paste.

This is very troublesome and error-prone in program development that the program statements cannot be moved or copies to another location of the program module.

I have over 30 TextBoxes and ComboBoxes on the form and about 20 pages of program code, using Access 2010 (same situation for Access 2013) on Windows7 PC with 4GB of RAM.

What can I do to solve or bypass this problem?

Your assistance is much appreciated.

Thanks.

Alan Chan
 
That is really a bizarre occurrence, that I have not come across. The very least I have had was after copying an entire module of 1008 lines of code, it just hangs there for a second, then it does save.

Maybe the Database is corrupted,

1. Have you tried Compact & Repair?
2. Have you tried import the objects into a New empty Database?
 
Yes you are right, after Compact & Repair the database, it does save after copy and paste on the code.

This explains why the problem went away before, could be after I performed database repair. It is strange that, before database repair:

1. I can save the changes if I do not paste any code
2. The program works

Anyway, the problem is solved.

Thanks
 
Yes Compact & Repair always is a good way to solve some immediate problems that deal with memory and performance issue.

It is always good to make a Compact On Close option ticked under File-> Options -> Current Database.

Glad you have it sorted. Good Luck. :)
 

Users who are viewing this thread

Back
Top Bottom