Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sometimes a code window is open but no errors are noticed. Any ideas?

Status
Not open for further replies.

Pack10

Programmer
Feb 3, 2010
495
US
I have an application that I am developing. Normal operation is every 5 minutes it checks for new emails located in a group mail box and adds them to a table in the db. We have built in security where if there is no activity on the PC for 10 minutes, it locks. What I have noticed is time to time I get a code window that opens.
No errors, just a code window opens. If I close it all is fine. I've never seen this behavior before. Does anyone have an idea why this happens.

Thx
 
What's in the code window?

Is it opening the DB and taking you to a line in the code where it has errored?

Are you running an MDE or MDB?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
There is no error. It is taking me to the last line that the editor was in. For instance, if I added a comment, it would open the form (for instance) and sit on the line which in this case was a comment.

If I was working on a form, and in the code behind the form, then that would open. Very wierd.
 
What options do you have selected in the start up ?

If you don't show the main DB does it still happen?

does it happen when the DB is compiled to an MDE and then run?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
It could be a phantom breakpoint but it may be hard to find. If you know where it is stopped, if it is stopped on a line of code, then you can copy that line of code, put it above or below the existing one and delete the old line. If that doesn't work, or it isn't stopping on a particular line of code, you might try importing everything into a new database shell and see if that takes care of it.

Bob Larson
FORMER Microsoft Access MVP (2008-2009, 2009-2010)
Free Tutorials/Samples/Tools:
 
Also ensure that the code is compiled and that it will compile.
 
I would do what Bob suggests but for that module of code, copy and paste it into the new database instead of importing.
 
If it's a "phantom breakpoint", which I see fairly often, you just need to decompile the database.

Open it with a shortcut (or by command-line) and follow the .mdb with /Decompile

Then when it's open, go to a code window, hit compile, save and close and you should be done.
--Jim
 
Hi Pack10,

I have seen just that behavior before.

Most of the suggestions you received above should solve the problem.

What I have done in the past is to open up a VBA code window,
Then Pick Debug>ClearAllBreakpoints (Do this twice)
Then, Save the code
Now do a Compile
Now do a Compact

Should solve a lot of random problems.

Note, I do a Compile and Compact at least once a day when I am doing work on a FrontEnd.

Hope This Helps,
Hap...


Access Developer [pc] Access based Accounting Solutions - with free source code
Access Consultants forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top