DLL load error in Access 2003

J

J_Goddard

I use the following code in an MS Access 2000 application, and it works fine:

Dim db As Database, rstControl As Recordset
Dim tblControl As TableDef

.... code snipped

CheckPoint = 0
'
' Loop to delete linked tables; tables are linked if the 'connect'
' property is not null
'
CheckPoint = 1
On Error Resume Next
'
' Don't generate an error if a table is not linked
'
For Each tblControl In db.TableDefs
If Not IsNull(tblControl.Connect) And Len(Trim(tblControl.Connect)) > 0
Then
DoCmd.DeleteObject acTable, tblControl.Name
End If
Next
CheckPoint = 2

When I ran this in Access 2003, the For Each tblcontrol line generated an
error loading dll message.

Of course, it did not say *which* dll was causing the problem.

The code compiles fine in Access 2003; might the problem be in the references?


Thanks

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top