Form Freezes then runtime error 2486

stormin_norm

Registered User.
Local time
Today, 06:28
Joined
Apr 23, 2003
Messages
213
I have run compact & repair in an attempt to fix a problem with a form freezing. I can't get into design view OR close the form. And then I get a runtime error 2486.

frmSelect contains txtBox where you enter a portion of the student name, then listbox is populated with all the students.

On doubleclick of the listbox student, a new form opens.
Private Sub lbStudentSelection_DblClick(Cancel As Integer)
DoCmd.OpenForm "frmAdult", , , "[StudentID] = " & Me.lbStudentSelection
End Sub

I did not find anyone with the same issue when searching the discussion group on "frozen forms" and derivations of this.

Has anyone seen this problem before or have a solution??

Should I copy these forms and queries to a temp name, delete the originals, run repair, rename queries back to original name??

-stormin'
 
Forms do become corrupt. I would import everything except that form into a new db then rebuild the form from scratch....

hth,
Jack
 
Can you simply build an identical form with a new unique name and avoid having to import everything?

I noticed the error pops up after ten or so double click events performing the DoCmd.openform. Is there any issue with memory leak, where I have to perform a check:
if form already open, then refresh form with new data vs. openform command?

Thanks.
norm.
 
You can rebuild the form without importing everything into a new db. Importing usually cleans up a few things that might be shaky in the db.

Are you clicking in the list box mutilple times to show different records in the form? Apparently you do not close the form between clicking in list box, so I would check to see if the form is open then use different code to show the selected record in the form rather than what you are doing now. I have never run into this problem because I have had occasion to do what you are doing... You could use a parameter query for the forms Record Source and have list box supply the parameter then a requery of the form should show you the correct record. There are other ways to do this as well...

hth,
Jack
 

Users who are viewing this thread

Back
Top Bottom