Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: error occur in modules cant find project or library in "Global gCnn As New ADOX.Catalog"


Message #1 by <elmerespinosa@y...> on Fri, 20 Jul 2001 05:32:02 +0800
Why if I declaring in the modules the code below always occur an error 

=3D

such as Cant find project or library ??? Please help me!!!!!





Function ClearTempAttachedTables() As Integer

Dim cat As ADOX.Catalog

Dim tc As Tables

Dim t1 As Table

Dim sSql As String





Set cat =3D New ADOX.Catalog

cat.ActiveConnection =3D CurrentProject.Connection



Set tc =3D cat.Tables

For Each t1 In tc

If Left(t1.Name, 3) =3D "QQ_" Then

    Rem tc.Delete (t1.Name)

    sSql =3D "Drop table " & t1.Name

    DoCmd.SetWarnings (False)

    DoCmd.RunSQL sSql

    DoCmd.SetWarnings (True)

   

End If



Next



Set tc =3D Nothing

Set cat =3D Nothing





End Function



Message #2 by "Peter Kaufman" <kaufman@l...> on Fri, 20 Jul 2001 19:17:33 +0700
You need open a module and set a reference to Microsoft ADO Ext xxx for DLL

and Security.



HTH,



Peter



> -----Original Message-----

> From: Espinosa, Elmer L. [mailto:elmerespinosa@y...]

> Sent: Friday, July 20, 2001 4:32 AM

> To: Access

> Subject: [access] error occur in modules cant find project or library in

> "Global gCnn As New ADOX.Catalog"

>

>

> Why if I declaring in the modules the code below always occur an error 

> such as Cant find project or library ??? Please help me!!!!!

>

>

> Function ClearTempAttachedTables() As Integer

> Dim cat As ADOX.Catalog

>




  Return to Index