Hi,
I would like to create a DAO DB file with the *.mdb extension. I tried this code but it didn't work:
Dim db As DataBase
Set db = CreateDataBase("C:|Db.mdb")
Could somebody please help me? Thanks!
Printable View
Hi,
I would like to create a DAO DB file with the *.mdb extension. I tried this code but it didn't work:
Dim db As DataBase
Set db = CreateDataBase("C:|Db.mdb")
Could somebody please help me? Thanks!
Rino
try this
this should workCode:Dim wrkDefault As Workspace
Dim dbsNew As DATABASE
' Get default Workspace.
Set wrkDefault = DBEngine.Workspaces(0)
' Kill the database if it already exists
If Dir("NewDB.mdb") <> "" Then Kill "NewDB.mdb"
' Create a new database
Set dbsNew = wrkDefault.CreateDatabase("NewDB.mdb", dbLangGeneral)
:cool: Gazza :cool:
Thanks for the help!