Link to home
Start Free TrialLog in
Avatar of bfuchs
bfuchsFlag for United States of America

asked on

Disturbing issue with MS Access Coding

Hi Experts,

I am encountering an issue, lately more then ever, when in middle of writing code I get the toolbox from form design, and when clicking on it my code editor closes and I am back to form design.

Does anyone knows what's causing it and what is the solution?

Attached screenshot.
untitled.bmp
Avatar of rspahitz
rspahitz
Flag of United States of America image

Obviously this is errant behavior.  Have you done a virus/malware check?  Seems like it might be a background process trying to do something it shouldn't.
Alternately, can you open the coding window as a separate window where you can still see the forms etc. and see what happens when you click on other things before clicking the toolbox?
And does the code window close when you click on the toolbar or when you close it? How about resizing it? Or Ctrl-Tab'ing to it?
Maybe check the Task Process (Ctrl+Shit+Esc) window to see what's happening (is a process running out of control, taking up too much processor time or too much memory?)
Avatar of Nick67
In the Access main window, in Form design, is the toolbox docked or floating?
I myself don't care for the floating UI elements.
They always seem to cover up something important.
Mine are docked -- and stay firmly docked.

What about yours?

Something to keep in mind: Timer events bleed over into the code window!
I have code on some forms that, when conditions are correct, a large control becomes in\visible every 3/4 of a second (blinking).
When that form is running and blinking, every 3/4 of a second code window does a syntax check!
Anooooooooooooooying!
That may be part or all of your intermittent grief
Avatar of bfuchs

ASKER

@rspahitz,
I will check those at next time this happens.

@Nick,
It was floating, do you mean to say this might be the cause of it?
I don't have anything running on timer in my pc.
<No Points wanted>
I don't have anything running on timer in my pc.
What Nick means is that you may have some code running on the timer event *in your database*

So check for any code on the OnTimer event
Avatar of bfuchs

ASKER

@rspahitz,
First I checked the AVG reports and there are no virus.
Secondly, I tried switching windows\tile horizontally at the time this last happened and see attached what I got...
When presses Cntrl+Tab it kept showing each time a different module.
Nothing unusual showed in my task manager, cpu was at 4%.

@Jeff,
I did understood that, and meant to say that although several parts of my app have a timer assigned to it, it only goes for certain users and mine is not one of them.
untitled.bmp
...Looking at that screenshot, ...a knee-jerk suggestion might be to try closing most, (if not all) of the 100+ code windows you have open there...
...then see if the issue recurs.

Also, have you compiled the code recently?
Try creating a blank database and importing all the objects

Finally, the appearance of the floating Toolbox seems to indicate a version of Access prior to the ribbon, ...so I am not sure if this is an issue concerning an older version of Access running under a newer version of Windows...
?

JeffCoachman
It was floating, do you mean to say this might be the cause of it?
Not necessarily a cause, but if that toolbar is docked, it won't appear by itself.  It'll be anchored to the main Access application window.
The problem may stop manifesting -- or the whole main window may throw itself into focus, instead of just that discombobulated toolbar.  One way or another, it's a change worth making to test the result.
Avatar of bfuchs

ASKER

@Jeff,
100+ code windows you have open there...
Its nothing to do with me, access (in my version) has this tendency of opening dozens of modules when opening one or two particular forms and going into the code window.
older version of Access running under a newer version of Windows...
My OS is Windows XP Pro SP3, don't think this is the issue here.
I compact/repair the database regularly, however may try importing all the objects into a fresh DB to see if that solves the problem.

@Nick,
The reason I have it floating is, I don't usually have it visible, just bring it up on demand, and have to remember always to push it up before opening code, that itself would be a pain in the neck.
What version of Access?
Avatar of bfuchs

ASKER

2000 SP3
ASKER CERTIFIED SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bfuchs

ASKER

Hi Experts,

I tried both suggestions, to import objects to new database and also to leave it docked, and could not reproduce the error, so perhaps both of these might solve the issue.
However its not a guarantee as this issue doesn't always happen, its the kind of problem that only happens when you less interested on it...
Avatar of bfuchs

ASKER

Thanks experts, as of now when following those 2 suggestions I was not able to reproduce the error.