By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,701 Members | 2,006 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,701 IT Pros & Developers. It's quick & easy.

Form opening/switching bug

P: n/a
Very strange one this.

Application written in Access 2000. Runs in 2003 at client's site, 2000 on
my development system. FE/BE system.

The app's startup form sets a few options, opens the switchboard, then
closes. Each of the buttons on the Switchboard opens a form (or report). The
Switchboard stays open in the background.

One is a 'View Courses' form. This presents a list of educational courses,
the user chooses one, clicks 'go to course' and details of that course,
students on it etc. are displayed (and the View Courses is closed).

The users are reporting this. If they are on the Courses form, with all the
course details for one course, the switchboard suddenly appears, or
occasionally the View Courses form. This happens without user interaction,
sometimes the user is away from the desk.

I've been able to half duplicate this. In the sense that if I have the
application open, do some work in some other programs, then go back to
Access (using Alt+tab) the application has switched to the Switchboard. But
even leaving the app open all night hasn't produced the random switch the
users are reporting.

Remember that the Switchboard is open in the background, but View Courses
isn't. When it happens with my system if I Ctrl+F6 I see that the Courses
Form is still open.

On the Courses form there are two command buttons, one opens the View
Courses form (and makes the Course form invisible), the other makes the
Courses form invisible, thereby revealing the Switchboard.

Interestingly the users called the other day to say this had happened, and
they'd left the machine as it was. However when the went to the machine
(with me on the phone to them) the screensaver had come on, so they moved
the mouse to get rid of it, and the machine was 'back to normal'.

This _appears_ to have have started since the users changed from Windows
2000 to XP pro. I've been on XP pro for some time, but to be honest don't
leave the application static like that for long enough to have the bug
appear.

My guess is that somehow the 2 command buttons are being triggered. I wonder
whether having forms hidden like this is also such a good idea.

Thanks, Emily
Nov 13 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Emily Jones wrote:
Very strange one this.

Application written in Access 2000. Runs in 2003 at client's site, 2000 on
my development system. FE/BE system.

The app's startup form sets a few options, opens the switchboard, then
closes. Each of the buttons on the Switchboard opens a form (or report). The
Switchboard stays open in the background.

One is a 'View Courses' form. This presents a list of educational courses,
the user chooses one, clicks 'go to course' and details of that course,
students on it etc. are displayed (and the View Courses is closed).

The users are reporting this. If they are on the Courses form, with all the
course details for one course, the switchboard suddenly appears, or
occasionally the View Courses form. This happens without user interaction,
sometimes the user is away from the desk.

I've been able to half duplicate this. In the sense that if I have the
application open, do some work in some other programs, then go back to
Access (using Alt+tab) the application has switched to the Switchboard. But
even leaving the app open all night hasn't produced the random switch the
users are reporting.

Remember that the Switchboard is open in the background, but View Courses
isn't. When it happens with my system if I Ctrl+F6 I see that the Courses
Form is still open.

On the Courses form there are two command buttons, one opens the View
Courses form (and makes the Course form invisible), the other makes the
Courses form invisible, thereby revealing the Switchboard.

Interestingly the users called the other day to say this had happened, and
they'd left the machine as it was. However when the went to the machine
(with me on the phone to them) the screensaver had come on, so they moved
the mouse to get rid of it, and the machine was 'back to normal'.

This _appears_ to have have started since the users changed from Windows
2000 to XP pro. I've been on XP pro for some time, but to be honest don't
leave the application static like that for long enough to have the bug
appear.

My guess is that somehow the 2 command buttons are being triggered. I wonder
whether having forms hidden like this is also such a good idea.

Thanks, Emily


Well, you are at your site and they are at their site. You run some
programs, they run theirs. Who knows what they run. They most likely
run a program that you don't. It would be interesting to hear what
programs they have running when this occurs.

Maybe they have a program that, when running, polls something and if not
true uses something like "SendKeys" and since your app is currently open
the SendKeys call executes in your app, not the calling app.

Nov 13 '05 #2

P: n/a
"Emily Jones" <em********@hotmail.com> wrote
The users are reporting this. If they are on the Courses form, with all
the course details for one course, the switchboard suddenly appears, or
occasionally the View Courses form. This happens without user interaction,
sometimes the user is away from the desk.


I have had a similar thing happen, but it's been a few years, and I don't
recall exactly the cause. My recollection was that it was caused by an
Access event firing every time the main window was redrawn. Redrawing the
window can happen when Maximize is called, or another application steals
focus from Access, and probably some other reasons.

One way you might try in dealing with the problem is to use forms with the
modal and popup properties set to true.
--
Darryl Kerkeslager

Nov 13 '05 #3

P: n/a
Thanks Darryl and Salad

I've been able to semi duplicate this on my system, so the differences
between our systems don't _seem_ to eliminate it.

As far as I can tell at the users only 3 users get this, but they are the 3
most intensive users anyway, so they would be the most likely to get it. All
the machines at the users are new, and came pre-installed with Windows XP
Pro etc. I think their network admins will have set the machines up
identically, though I'll check. Though I see the users have started to
'decorate' their machines with wallpaper and presumably screensavers too.

The modal suggestion seems like a good idea. I'll put it on my list of
things to try.

At the moment I'm doing the thing of hiding forms then making them visible.
In this particular case I may well drop that anyway, as the big form that
I'm hiding has so many data validation things on it that it may be better to
explicitly close/re-open it. And the switchboard will open very quickly.

But I'd rather _attempt_ to get to the bottom of this.

If it is keystrokes being sent to the application then it could be Ctrl+F6,
or Alt+R (command button shortcut), or Alt+F. I'm pretty sure the users
aren't using the command button shortcuts though. I'd like to trap the
keystrokes. I can disable those. They shouldn't be using Ctrl+F6 and they
can live without the others, for now. So I use key preview for the form,
yes? If I set that for the Main form, will it trap keystrokes to the sub
form?

And after I do trap them, is there any way to see where they actually came
from? Presumably some sort of API call.

Yours, Emily Jones
"Emily Jones" <em********@hotmail.com> wrote in message
news:43***********************@news.aaisp.net.uk.. .
Very strange one this.

Application written in Access 2000. Runs in 2003 at client's site, 2000 on
my development system. FE/BE system.

The app's startup form sets a few options, opens the switchboard, then
closes. Each of the buttons on the Switchboard opens a form (or report).
The Switchboard stays open in the background.

One is a 'View Courses' form. This presents a list of educational courses,
the user chooses one, clicks 'go to course' and details of that course,
students on it etc. are displayed (and the View Courses is closed).

The users are reporting this. If they are on the Courses form, with all
the course details for one course, the switchboard suddenly appears, or
occasionally the View Courses form. This happens without user interaction,
sometimes the user is away from the desk.

I've been able to half duplicate this. In the sense that if I have the
application open, do some work in some other programs, then go back to
Access (using Alt+tab) the application has switched to the Switchboard.
But even leaving the app open all night hasn't produced the random switch
the users are reporting.

Remember that the Switchboard is open in the background, but View Courses
isn't. When it happens with my system if I Ctrl+F6 I see that the Courses
Form is still open.

On the Courses form there are two command buttons, one opens the View
Courses form (and makes the Course form invisible), the other makes the
Courses form invisible, thereby revealing the Switchboard.

Interestingly the users called the other day to say this had happened, and
they'd left the machine as it was. However when the went to the machine
(with me on the phone to them) the screensaver had come on, so they moved
the mouse to get rid of it, and the machine was 'back to normal'.

This _appears_ to have have started since the users changed from Windows
2000 to XP pro. I've been on XP pro for some time, but to be honest don't
leave the application static like that for long enough to have the bug
appear.

My guess is that somehow the 2 command buttons are being triggered. I
wonder whether having forms hidden like this is also such a good idea.

Thanks, Emily

Nov 13 '05 #4

P: n/a
Do you use any OnResize or OnTimer events?

--
Darryl Kerkeslager
Nov 13 '05 #5

P: n/a
"Darryl Kerkeslager" <ke*********@comcast.net> wrote in message
news:K7********************@comcast.com...
Do you use any OnResize or OnTimer events?


Don't think so. But I'll have a look, thanks.

What I've done for now is I've written a keylogging routine, which I'm
calling from the suspect forms. It logs users, form, active control and
state of shift/ctrl/alt keys too. And logs everything to a seperate mdb on
the server. I've tested it manually and also by writing a little VB app that
did a SendKeys.

I'll ask the users to note the exact time that this occurs again. So that at
least I can see which, if any, keystrokes are making this happen.

But I may be none the wiser. Is there any way of finding out where
keystrokes have come from, if they've been sent by an app? Or do they always
_appear_ to come from the keyboard.

Yours, Emily
Nov 13 '05 #6

P: n/a
> But I may be none the wiser. Is there any way of finding out where
keystrokes have come from, if they've been sent by an app? Or do they
always _appear_ to come from the keyboard.


Don't know, sorry.

My thinking is that you won't detect anything unusual - that it is Access
events causing the problem, not keys.
--
Darryl Kerkeslager
Nov 13 '05 #7

P: n/a
Just noticed that the Options/Advanced/Refresh option is set to 5 seconds.
Seems a bit short to me. Isn't it usually 60 seconds? Could this cause
unusual behaviour?

Emily

"Darryl Kerkeslager" <ke*********@comcast.net> wrote in message
news:2J******************************@comcast.com. ..
But I may be none the wiser. Is there any way of finding out where
keystrokes have come from, if they've been sent by an app? Or do they
always _appear_ to come from the keyboard.


Don't know, sorry.

My thinking is that you won't detect anything unusual - that it is Access
events causing the problem, not keys.
--
Darryl Kerkeslager

Nov 13 '05 #8

P: n/a
"Emily Jones" <em********@hotmail.com> wrote
Just noticed that the Options/Advanced/Refresh option is set to 5 seconds.
Seems a bit short to me. Isn't it usually 60 seconds? Could this cause
unusual behaviour?


It is usually 60 seconds. However, unless you have forms that are bound to
data over a particularly slow LAN, I don't see how you would even notice
anything, and IMHO, would not cause any problems anyway. No harm in setting
it to 60 seconds just to eliminate any concern, though.
--
Darryl Kerkeslager
Nov 13 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.