View Single Post
  #1  
Old February 17th, 2006, 03:43 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Multiple Instances of Form Created By Form Open

I'm using Access 2002 on Windows 2000. I have a search form where the
user selects a row in the subform data sheet and then clicks an open
button to bring up another form with the data related to the row they
selected. The open button runs some simple code that does a form open
based on the primary key field in the subform. In testing, our QA
inadvertently clicked multiple times on the open button and ended
creating 10 plus instances of the form (I didn't think this was
possible in Access) and if you try to click on one of the instances
Access crashes.

I tried disabling the open button as the first action in the on_click
event and I also tried checking to see if the form was already open
before executing the Docmd.OpenForm, but that didn't help. This
strange behavior only happens about every 20th time the QA tries
multiple clicks. Is this some strange Access bug? Any ideas or
suggestions would be greatly appreciated.

Thanks, David.