create new database method

mudster01

Registered User.
Local time
Today, 08:55
Joined
Aug 27, 2006
Messages
10
Hi
I'm trying to create new database but get runtime err 3204 "Database already exists" however i thought the kill removes it, also i cannot actually see the database after code runs 1st time round. Code is as per the help files:


Sub createnewdb()
Dim dbnew As Database
Dim wrkDflt As Workspace

Set wrkDflt = DBEngine.Workspaces(0)

If Dir("c:\temp\newDB.mdb") <> "" Then Kill "c:\temp\newDB.mdb"

Set dbnew = wrkDflt.CreateDatabase("newdb.mdb", dbLangGeneral)


YOur help much appreciated.
Thanks,
M
:(
 

Users who are viewing this thread

Back
Top Bottom