Hidden forms re-appearing

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

Guest

Hi,

Wonder if anyone could help with one. I am currently providing support and
development for a client who uses an Access adp/ SQL server setup, everything
works fine and as it should other than this issue with a hidden form
reappearing. The (dialog [popup=no, modal=no]) form is just a list of data
that the user selects, the form is then hidden and another form is displayed
that the user can then edit.

The cause of the form re-appearing seems to be related to the policy being
updated on Windows XP, this could happen at any time it seems and when this
does happen Access freezes totally and the only way to get out of it is to
use task manager.

Has anyone seen this before or can give me a clue as to how to solve this
please?

Why would Access be affected by this event?

Cheers
 
What it almost sounds like to me is that when you leave the other form
Access is then trying to return to the hidden form, but because it is
hidden (apparently most of the time) then access is waiting for action
on something you can't see.

Try taking the set hidden out of the process and see if you are
returning to that form. If so then you can try to figure out how you
want to get around the problem with the logic that you require for your
forms.

Ron
 
An alternate method is NOT to hide the form that they are putting the
information into. Instead as they load/select each piece then load it
into another form that is never visible (is always hidden). That way
your quires, etc will working using the truely hidden form and then
when you leave this popup form close it instead of trying to hide it.

Ron
 
Thanks for info Ron,

Just to clarify the way I am using the forms, I have a form which I fire off
from a menu item, this form displays a list of references that the user can
filter using a combobox, the user can then double-click the item in the list
and open up another form which they can then edit/enter details. The form
that was used to open the edit form is hidden once the user double-clicks on
a item in the list. When the user has finished editing they close the edit
form and the hidden form is then made visible so the user can then go and
select another reference.

Everything works as it should and no errors occur at any time while the user
is using the Access application. However and this is where I have managed to
work out whats going on thanks to your first piece of advice, when Windows XP
refreshes it's computer/user policy it also affects Access. The hidden form
seems to get refreshed to and fires events like 'GotFocus', 'Lost Focus' and
'Resize'. I am using the resize event to do some simple work for when the
combobox is updated, so when the resize event is fired by the policy refresh
this seems to force the form to be visible although Access still seems to
think it is hidden and that's why Access freezes.

I can also reproduce this problem by using the command line tool 'gpupdate'
to force a policy refresh on my computer.

I have added a bit if code to check to see the form is visible before
running the code in the resize event, and this has cured the problem now.

Cheers

Terry
 
Back
Top