WinXP conflict / How to crash Access.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello.

I write to this forum because I do not know how to otherwise report this bug
that has been haunting my program for a very long time. Today I were finally
able to narrow out the cause of this bug:

1. Create an empty database
2. Create a form, and make the form a popup, blocking and with dialog frame
3. Add a button to this form
4. Write a OnClick VBA handler:

Dim X As Date
X = Now
While DateDiff("s", X, Now) < 20
DBEngine.Idle
Wend
DoCmd.Close acForm, Form.Name

5. Close the form, and open it.
6. Click the button.
7. The waiting loop starts to run. After a while, Windows XP gets impatient,
and marks the Access application as being "not responding". When the wait
loop completes, the form is being closed, and for some reason Access is left
in a coma.


If anyone has more info about working around this bug, or hits for how to
troubleshoot more, or on how to best report this kind of bug, I would greatly
appreciate the info.
 
I can't reproduce that, Ivar. The code runs, and closes the form, without
any problem on my system (Access 2003).

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
When observing that the focus may be messed up by Task Manager, I have found
a soulution that seems to work:

Form.SetFocus
DoCmd.Close acForm, Form.Name

This way I restore the state just before closing the form. But it is still a
bug in Access, and a slight chance that Task Manager will change things
around between the two calls....
 
Back
Top