Item not found in this collection

  • Thread starter Connie via AccessMonster.com
  • Start date
C

Connie via AccessMonster.com

I have just converted a replicated d.b. to a regular one by importing all
of the object except the tables, which I brought in using the 'make table
query' method suggested in other postings. I am now retesting the forms,
which I have inherited, and I have encountered the "Item not found in this
collection" error. I have read the other posts regarding this error, but I
am still lost about how to fix my own problem.

This error has only occurred since I converted the replicated d.b. to a
regular d.b.

The following snippet is the relevant portion called by a function as a
result of a user double clicking on a record in a list box on a search
form. I have been able to see that the correct variables have been passed
this far.

(BTW, I DO have the MS DAO 3.6 Object Library checked in the references)

***I would also like to mention that I was not the person who named the
tables with spaces in them - they are also inherited!

Public Sub FindEntity(intID As Integer, strName As String, frm As Form)
' being passed in might be: 10, "CompanyX", [Legal Entities]

Dim strSQL As String
Dim rstTemp As DAO.Recordset
Dim ctrlT As Control

Select Case frm.OpenArgs

Case "Legal Entities"
Forms("frmLegalEntity").Controls("EntityNo").SetFocus
Forms("frmLegalEntity").Controls("EntityNo").Text = intID
Forms("frmLegalEntity").Controls("EntityName").SetFocus
Forms("frmLegalEntity").Controls("EntityName").Text = strName

FillData intID, Forms("frmLegalEntity"), frm.OpenArgs
Forms("frmLegalEntity").Controls("Page1").SetFocus
End Select

DoCmd.Close acForm, "frmSearchEntity"
End Sub


Some of the data is filled in correctly but on the final page of a 5 page
form, it breaks and gives me this lovely error.

Any suggestions for this non-programmer would be greatly appreciated.
 
C

Connie via AccessMonster.com

I am sorry, I just noticed that this was posted in the Queries discussion.
Can anybody help me to cross-post to the Forms Programming discussion? I am
not sure how to do that without double posting.
 
Top