Closing Complex Forms: Inputboxes popping up.

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

Guest

I have a tough one here.

I have a large MSAccess database. One of my more complex forms starts off
with the user picking date boundaries from two calanders. These dates are
used as a filter to show a list of studies. The user picks one of the Studies
from a list box which is then used as a filter for showing the Top 5 Issues
from that Study between those dates. By picking one of the Top 5 Issues the
system then filters out the Top Root Causes for that issue, from that Study,
between those dates. etc. etc. etc.

When I close the form using the standard CLOSE button it should just close
the form and going back to the previous form. Instead it Minimizes the form
and then starts popping up Input Boxes prompting me for variables. The
variables it is looking for are actually the listboxes from the now minimized
form.

If I hit "Cancel" about 6 times it seems to clear the problem, closes the
form, and goes back to the previous screen.

HELP!
 
Two possible reasons spring to mind:

1 (and most unlikely I think)

You have an event procedure assigned to the form unload, close or
deactivate event.

2 (most likely)

You are referencing the controls on the popup form from your main form.
The pop up form needs to be open in order to achieve this. I would
recommend assigning these values to hidden textboxes on your main form
before closing the form, and referencing these instead; as you cannot get
the value of a control which no longer exists in memory.

Hope that helps

John Webb
 
Back
Top