susanmgarrett
Registered User.
- Local time
- Today, 07:12
- 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
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