By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,775 Members | 1,425 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,775 IT Pros & Developers. It's quick & easy.

Access 2003 Can't edit VBA code

P: n/a
Hi all,

I'm trying to edit VBA code in my mdb file for a form. Basically, I
want to delete and comment out some lines of code. (I'm quite good at
VBA, so I don't need help there).

I'm trying to comment out a procedure, and delete all calls to that
procedure.

The problem is, as soon as I try to delete or comment anything, Access
crashes.

It shows a popup that says "Access has encountered an error, and needs
to close", and gives me the option of reporting or not reporting the
error to MS.

No error info is given.

Has anyone run into this before?

I was able to add the code with no problem, and don't know why taking
the code out would cause any problems.

Yes, I have run the Database utility "Compact and Repair Database".

Thanks for any help,

John

Jan 5 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Greetings,

I have had a similar issue with Access2003, but with changing
printer/page settings on a report from the Print menu. I then changed
printers from the PageSetup menu, and Access stopped crashing on me.
The issue here is that Acc2003 is kind of finicky.

In your case, I would try changing the name of the procedure instead of
commenting it out. Then do a debug/compile to trap the errors you will
get when the calls to the old name complain. Then comment out those
calls. Then rerun the Debug/Compile.

HTH

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Jan 5 '07 #2

P: n/a
This certainly sounds as if it is some form of corruption. Two suggestions:

1. Just because it's simpler, first, get your Office 2003 CD/DVD and repair
your installation.

That might fix it.

If not,

2. Create a new database:

A. Make a copy of your database, then delete all the code.

B. Then import the objects into a new database.

C. Then use Save as Text on code from the original, and Load from Text on
the new database.

D. Then for Controls and Forms with event code, reset the Event to "Event
Procedure."

Search this newsgroup at http://groups.google.com for assistance on the
undocumented (or, at best, unofficially documented) Save as Text and Load
from Text features.

Larry Linson
Microsoft Access MVP

<jj****@gmail.comwrote in message
news:11********************@q40g2000cwq.googlegrou ps.com...
Hi all,

I'm trying to edit VBA code in my mdb file for a form. Basically, I
want to delete and comment out some lines of code. (I'm quite good at
VBA, so I don't need help there).

I'm trying to comment out a procedure, and delete all calls to that
procedure.

The problem is, as soon as I try to delete or comment anything, Access
crashes.

It shows a popup that says "Access has encountered an error, and needs
to close", and gives me the option of reporting or not reporting the
error to MS.

No error info is given.

Has anyone run into this before?

I was able to add the code with no problem, and don't know why taking
the code out would cause any problems.

Yes, I have run the Database utility "Compact and Repair Database".

Thanks for any help,

John

Jan 5 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.