Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create new database 1

Status
Not open for further replies.

peljo

Technical User
Mar 3, 2006
91
BG
I am creating a new database and i am trying to export some tables to this database.I get the error named Could not find installable ISAM.Could yo help me with my error ?
below are my functions

Call ANewDB("c:\BE\Init.mdb")
Dim wsp As DAO.Workspace
Set wsp = DBEngine.Workspaces(0)
Dim strPassword As String
strPassword = "secret"
Dim dbs As DAO.Database

Set dbs = wsp.OpenDatabase("C:\BE\Init.mdb", False, False, False)
DoCmd.TransferDatabase acExport, "Microsoft Access", ("C:\be\Init.mdb"), acTable, "products", "products1"
DoCmd.TransferDatabase acExport, "Microsoft Access", ("C:\be\Init.mdb"), acTable, "constants", "constants1"
Set dbs = Nothing

End Sub

Function ANewDB(tName As String)

' Call ANewDB("c:\BE\Depot.mdb")

'*******************************************
Dim wsp As Workspace, db As Database
Dim db2 As Database
Set db = CurrentDb
Set wsp = DBEngine.Workspaces(0)
Set db2 = wsp.CreateDatabase(tName, dbLangGeneral)
db2.Close
End Function

 
But i have just created the db. it is caled INIT with the path : C:\be\Init.mdb"),

Is there any fault in my code ?
 
Yes, there is a problem with your code. Change this line:
Set dbs = wsp.OpenDatabase("C:\BE\Init.mdb", False, False, False)

To:
Set dbs = wsp.OpenDatabase("C:\be\Init.mdb")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top