Print Page | Close Window

Error 3420

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=5727
Printed Date: 19 September 2024 at 12:49pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Error 3420
Posted By: cryo75
Subject: Error 3420
Date Posted: 08 December 2006 at 12:38pm
Hi,
 
I'm getting an error 3420 (The object is not valid anymore) with the following code:
 
        With grdList
            For Each oRec In grdList.Records
                eType = Val(oRec.Item(ID_GRID_TYPE).Value)
                If (eIngType = bbMyType)  Then
                    oRec.Visible = True
                Else
                    oRec.Visible = False
                End If
            Next oRec
   
            .Populate
        End With
 
The line causing the error is:
eType = Val(oRec.Item(ID_GRID_TYPE).Value)
The item object is totally empty (it looks like an ADO field object). I have previously filled all records (and items) by loop through my own ado recordset and setting values.
 
Any ideas?
 
Thanks,
Ivan



Replies:
Posted By: cryo75
Date Posted: 09 December 2006 at 2:18am
Problem solved!
 
The Additem method of the record object accepts a variant. I was adding the ado field object. I needed to pass the field's value!!
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net