Avatar of pcalabria
pcalabria
Flag for United States of America asked on

MS Access form will not allow me to view event procedure vba code

Hello Experts, I'm using Access 2K on a Windows XP Professional SP3 platform.

Something happended to one of my forms, and now, when I try to open the vba code for any event procedure, nothing happens.

I have already tried:
Compact and Repair
Recompiling
Compiling
Rebooting the computer

And still have the same problem.
Other forms allow me to open the event procedure code without issue.

Is there any way I can fix this problem without rewritting the code or restoring from a back up?
Microsoft Access

Avatar of undefined
Last Comment
pcalabria

8/22/2022 - Mon
mbizup

Is this the same form we were talking about here?
https://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_28070246.html

Your form/database may be corrupt.

First make a backup of your database as it is now.

There are several things you can try...

- Compact/repair (You've already done this)

- Decompiling, and compact/repairing again.  See Jim Dettman's article about this (read the disclaimers in the last couple of paragraphs before trying it):
https://www.experts-exchange.com/Microsoft/Development/MS_Access/A_2043-Decompile-What-it-is-what-it-does-and-how-to-use-it.html

Also about decompiling:
http://www.granite.ab.ca/access/decompile.htm

- Re-create this form.  Ctrl-A , Ctrl-C can be used to copy all objects on it to a new form.

- Import all objects into a new database
pcalabria

ASKER
mbizup... thanks for responding.
No, this is not the form that was the subject of the previous issue.
Thank you for remembering.

I have tried all the tips you've provided, and they have not helped.
I can restore the form from my backup,  my last backup was when I began working on the form this morning and have since invested at least four hours.

With this said, it won't be the first time I've lost code, like I suspect most of us have.
The real issue is why did this happen.

I suspect my database is becoming unstable for some reason.  Perhaps I'm getting near to a maximum limit of Access :-(

It seems that I have to decompile several times a week.  I'm sure that's not right.
The database uses a split front end back end setup, and the front end is 169,944KB in size.
Is that big for a front end?

Im also accessing my code using Remote Desktop as its on another machine.  I've wondered whether that may be the issue.

Hope you or someone else in guru land can help.

Thanks
mbizup

<<
not the form that was the subject of the previous issue.
>>
Ok - the reason I suggested recreating the textbox in that one was a hunch that it was some mis-set property that would take a lot of guesswork to resolve - and recreating it would be faster.  This question following so closely after just made me second-guess that.

<<
 Perhaps I'm getting near to a maximum limit of Access
>>
Maximum file size limit in access is 2 Gig

<<
the front end is 169,944KB in size.
Is that big for a front end
>>
In my experience, that is large, but not unmanageable.  Do you have temp tables that can be deleted or cleared out?  Also, if you have access to an Access 2007 or higher machine, just for kicks try compact/repairing under a newer version of Access.  I have no supporting articles, etc for this - but I have compacted several 2003 and earlier DBs using 2007 and have seen a dramatic size reduction in cases where compact/repairing using Access 2003 has made little to no difference.

But that is not likely to help with your VBA issue.  Are you able to get to the code behind the form by navigating through the VBA Project tree in the VBA editor?

<<
 using Remote Desktop as its on another machine.  I've wondered whether that may be the issue.
>>
That has been problematic for me in the past (using Access 2003).  I think there are a couple of regulars here who have more experience developing databases like this who may be able to address that point better.
Your help has saved me hundreds of hours of internet surfing.
fblack61
pcalabria

ASKER
I do have access to 2007 and 2010, although I thought I would need to convert the database if I went that route.

Does it seem highly unusual that I should have to decompile as often as I do?  What happens is that database seems to crash and I can not open the program side at all.  When I decompile it fixes everything... until it happens again.

Any other help would be appreciated.

Thanks


By the way...the previous problem turned out to be another routine that I was running as part of a timer event.  The routine had code that was hiding the text box.  The reason recreating the textbox did the trick was that in  the process I closed the other form to clear up the workspace.. thereby stopping the timer event.  LOL.  Fortunately, the process resulted in me figuring out what was going on!
Scott McDaniel (EE MVE )

I use remote desktop regularly to work with several client databases, and I've not seen any negative impact (other than productivity on my part, since some of the RDs are slow).

Does it seem highly unusual that I should have to decompile as often as I do?
Yes, it does to me. I decompile fairly regularly, but being forced to decompile several times a week would lead me to believe something else is going on.

I know we've gone over this before, but are you sure the Remote Desktop is fully updated with all Office and Windows updates? 2K is no longer in support, but all of the service packs and stuff are still available, so be sure that you've got all of that straight.

although I thought I would need to convert the database if I went that route.
You would have to convert it, but you could try creating a new .mdb file in 2010 and importing everything into that new 2010 file. You can save the .mdb file to be compatible with 2000 directly in 2010, so perhaps that would work. I'd caution you against doing any actual work in 2000; if you inadvertently use a feature specific to 2002 or later, and your users are running 2000, then they would obviously not be able to run the app.
SOLUTION
Jim Dettman (EE MVE)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
mbizup

>>>  I'd caution you against doing any actual work in 2000; if you inadvertently use a feature specific to...

Scott,

Did you mean to say  "I'd caution you against doing any actual work in 2010" ?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
pcalabria

ASKER
Thanks for you help and great ideas.
Unfortunately, none solved my problem so I split the points.
pc