Compile Error: Error in Loading DLL (1 Viewer)

susanmgarrett

Registered User.
Local time
Today, 10:02
Joined
Dec 7, 2004
Messages
41
I am trying to run the following Macro:

Public Sub s_runMe()
Dim cn As ADODB.Connection
Dim rs1 As ADODB.Recordset
Dim rs2 As ADODB.Recordset

Set cn = CurrentProject.Connection
Set rs1 = New ADODB.Recordset
Set rs2 = New ADODB.Recordset


rs1.Open "category4createtemp", cn, adOpenDynamic, adLockOptimistic
rs2.Open "TempCategory", cn, adOpenDynamic, adLockOptimistic

rs1.MoveFirst
rs2.AddNew
rs2![fkTrack] = rs1![fkTrack]
rs2![Category] = rs1![Category]
rs1.MoveNext


Do While Not rs1.EOF
If rs1![fkTrack] = rs2![fkTrack] Then
rs2![Category] = rs2![Category] & ";" & rs1![Category]
Else
rs2.AddNew
rs2![fkTrack] = rs1![fkTrack]
rs2![Category] = rs1![Category]
End If

rs1.MoveNext

Loop

rs1.Close

MsgBox "Done"

End Sub

This is one of 5 macros in a set - two of the others worked fine this morning. Then went I went to run this one, I received a message telling me that AXCTRL32.ocx was missing and that VCMAXB.ocx was missing. I've found the latter but have no idea what the former is about.

I went into Design and references - removed the AXCTRL32.ocx missing item and now I receive the following message:

Compile Error: Error in Loading DLL

Any ideas?

Thanks.

Susan
 

modest

Registered User.
Local time
Today, 13:02
Joined
Jan 4, 2005
Messages
1,220
MAke sure you have a reference to ActiveX Data Objects --- Compact & Repair your database -- and decode your database as well.
 

susanmgarrett

Registered User.
Local time
Today, 10:02
Joined
Dec 7, 2004
Messages
41
Newbie at VBA - need help.

MAke sure you have a reference to ActiveX Data Objects

Um . . . how? Where do I go to check that?

Compact & Repair your database

Done.

and decode your database as well.

Again, how?

Thanks very much - I am learning so much from you people!

Regards,

Susan
 

Users who are viewing this thread

Top Bottom