fileinfo RRS feed

  • Question

  • I have two access databases that I use this - "Dim files As fileinfo" -  to check names in a directory from vba and everthing works fine.  But I am trying to create a new database using this and I get an error - "user-defined type not defined".  I am using access 2002.  References are the same, all properties in the form are the same, etc..., anything I know to check is the same.  But I just cannot get the new database to work.
    Thursday, November 15, 2012 3:45 AM

All replies

  • This is vbscript but try something similar like;

    Const Jet4x = 5

    CreateNewMDB "C:\Data\Code\mydatabase.mdb", Jet4x

    Sub CreateNewMDB(FName, JetVer)
      Dim Catalog
      Set Catalog = CreateObject("ADOX.Catalog")
      Catalog.Create "Provider=Microsoft.Jet.OLEDB.4.0;" & _
         "Jet OLEDB:Engine Type=" & JetVer & _
        ";Data Source=" & FName
    End Sub




    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    Thursday, November 15, 2012 3:57 AM