Solved

Disturbing issue with MS Access Coding

Posted on 2015-01-05
14
81 Views
Last Modified: 2015-01-11
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
0
Comment
Question by:bfuchs
  • 6
  • 4
  • 3
  • +1
14 Comments
 
LVL 22

Expert Comment

by:rspahitz
ID: 40532470
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?)
0
 
LVL 26

Expert Comment

by:Nick67
ID: 40532511
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
0
 
LVL 3

Author Comment

by:bfuchs
ID: 40532781
@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.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40532823
<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
0
 
LVL 3

Author Comment

by:bfuchs
ID: 40532843
@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
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40532890
...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
0
 
LVL 26

Expert Comment

by:Nick67
ID: 40534069
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.
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 3

Author Comment

by:bfuchs
ID: 40534293
@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.
0
 
LVL 26

Expert Comment

by:Nick67
ID: 40534301
What version of Access?
0
 
LVL 3

Author Comment

by:bfuchs
ID: 40534306
2000 SP3
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 250 total points
ID: 40534309
Give the old standby a try:
Create a new, blank database file and import all the objects...
Then retest for this anomaly...
0
 
LVL 26

Assisted Solution

by:Nick67
Nick67 earned 250 total points
ID: 40534390
I keep that toolbar docked in Access 2003toolbar dockedThen it's not a problem
0
 
LVL 3

Author Comment

by:bfuchs
ID: 40536745
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...
0
 
LVL 3

Author Closing Comment

by:bfuchs
ID: 40543483
Thanks experts, as of now when following those 2 suggestions I was not able to reproduce the error.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now