Run-Time Error 429 on reference Me.Recordset.RecordCount (ActiveX component can't create object or return reference to this object)

I have a database that several individuals are using.  One, and only one of the individuals receives the following error:  Run-time error '429':  ActiveX component can't create object or return reference to this object.

I checked all of the references on the users system, and nothing seems to be missing.  I even installed MDAC 2.8, to no avail.

The line that the error occurs on is as follows.

"If (Me.CurrentRecord > Me.Recordset.RecordCount) Then"

The reference which actually causes the error is "Me.Recordset.RecordCount".

"Me" is a subform, created from an existing form.  The existing form(and this subform) have a record source specified which is a single table. I imagine this could have some impact.

I know that the RecordCount property is available from both DAO and ADO.  As I mentioned I did install MDAC 2.8 and hoped this would resolve any problem with ActiveX components, but I imagine this should have also addressed any problems with DAO?

Any input would be greatly appreciated.  Thanks in advance,

- Michael


mjs082969Asked:
Who is Participating?
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
If your form is unbound then it would throw this type of error.  Try using this if..then loop around your code

If Nz(Me.RecordSource) = 0 Then
   'Your code goes here
End If

Hope this helps.
-Jim
0
 
mjs082969Author Commented:
Jim,

Should I concern myself with the fact several people don't experience this issue.  Or is this one of those "if you do it wrong, you will eventually get burned situations" and I finally got burned situations.

Thanks for your input/assistance!

- Michael
0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
>several people
Several people very likely have several different pc's, with several different configurations, which means 'some' may not have a file that your app needs.
0
 
mjs082969Author Commented:
That worked for that instance, but another error of the same type wasn't waiting very far away.

I determined that the issue was probably that my DAO resources had not been properly registered.  After I re-registered DAO360.DLL (in the Run box:  regsvr32 "C:\Program Files\Common Files\Microsoft Shared\DAO\DAO360.DLL").

After registering the DLL, I no longer experienced the issue.

Thanks Jim!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.