Error 3265, item missing from collection
Help! I'm trying to create a simple html report file, and I keep getting
the error "item missing from collection" on lines where it's accessing
specific fields from my database.
Here's the code snippet where the error(s) occur:
If (datFamily.Recordset.RecordCount > 0) Then
datFamily.Recordset.MoveFirst
Dim count As Integer
count = 0
'While Not (datFamily.Recordset.EOF)
===> Print #6, datFamily.Recordset("Family_ID")
'Print #6, " "
Print #6, datFamily.Recordset("Family_Name")
'Print #6, " -- $"
===> Print #6, datFamily.Recordset("Balance")
Print #6, "<br>"
I did some research on previous posts, and saw several people comment that
this error is often caused by a typo. Well, I have checked my code against
the database field names several (many many many) times, and see no
discrepancy.
This error made me go "???", so I tried making a very simple form which
just accessed the same database to get those field values...and it worked
fine! So I'm thinking it must be something else on this one form? But the
only other time this "datFamily" database is accessed is during Form Load
for an SQL query, which follows:
datFamily.RecordSource = "Select Distinct [Family_Name] " + _
"from Family order by [Family_Name]"
I have refreshed the database, but to no avail. Please either enlighten me,
releasing me from the depths of my profound ignorance, or give me a command
which will mercilessly club this database into instant obediance! ;)
I await your replies with breathless anticipation.
Liana