Stop without breakpoint or error message

Hi,

When I open a form, the code can stop for no reason on a line of code in a sub without any error message nor any Breakpoint.
What could be the reason?
And when I click on F8, the code resume.
Any idea?
SommerAlainAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Try this.
Above the line where it stops, add a couple of lines like this
Dim X
x=1
Then set a actual breakpoint on X=1.
Open the form - should break on X=1
Clear that break point, remove code, close and reopen.

If this does not fix it, then reboot your system to clear the phantom breakpoint.

mx
0
SommerAlainAuthor Commented:
Hi,

Thank you.
This story sound strange.
I agree that it might be a phantom breakpoint, problem is that I have a lot of subs and it cannot be a feasible solution.
Best regards
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Well, it is a Phantom Breakpoint ...
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

GrahamSkanRetiredCommented:
One way to cause a break without setting a breakpoint is to use a Watch and choose one of the two break settings.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
So,  what was the solution ?
0
SommerAlainAuthor Commented:
Both of the 2 proposed solutions can be used.
As I have many subs, I can use the first one only for forms with less than 5 subs. But basically I will try to switch to Watch procedures.
0
Dale FyeCommented:
aside from MX's solution, I thing the easiest solution is to create a new database and import all of the objects from the old one.

Another way is to decompile the application and recompile it with syntax like:

"C:\Program Files (x86)\Microsoft Office\Office12\msaccess.exe" "E:\FilePath\YourFile.accdb" /decompile

The first section is the location of the MSAccess.exe file (in quotes), followed by the full path and file name of your mdb or accdb (also in quotes), followed the /decompile option
0
SommerAlainAuthor Commented:
Hi,

Thanks a lot.
I do recreate a new database when it becomes to heavy and actually it improves significantly the performances. I will do it definitively.
Decompilation seems a little bite drastic. I will make a trial.
Have a nice week end
0
Dale FyeCommented:
Whenever I start a new project, I modify a batch file which contains all that is needed to do the decompile.  Then at least once a week, I open the application using that batch file.  This generally does a pretty good job of getting rid of all the trash.
0
SommerAlainAuthor Commented:
Hi thank you.
I will try it.
Let's hope that I will find the way to do it in Windows8 -).
0
SommerAlainAuthor Commented:
Hi,
Many thanks.
I did it and my application went from 75 Mo to 50 Mo.
That is quite impressive.
I used to obtain such a result with redoing a new database.
Does decompiling bring the same value added?
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
FYI ... I'm a big fan of Decompile. I have posted my full decompile procedure here as solutions to corrupted databases and or weird problems 100's of times.

HOWEVER, Decompile can trash your db and make it unusable and unrepairable.
SO ... be absolutely SURE ... that you create a quick backup of your db before ... executing decompile.  Select your db in Windows Explorer, Control C, Control V. Done. 2 seconds for a backup. Or hold the Control key, and drag a copy of the db to another spot in the Window, or onto your desktop.

mx
0
SommerAlainAuthor Commented:
Hi,

Thank you.
You are absolutely right for th backup.
It has saved me from very uncomfortable situations.
I will do it.
Have a great week end
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.