D
Dangermouse
Hi, I'm new to VB, but what I'm after if possible is this.
via a macro call upon a module, which will create a temporary database, the
code I'm using is this code
Public Function CreateDatabase()
Dim db As Database
On Error GoTo ErrorHandler
Set db = DBEngine.CreateDatabase("c\ tmp\mydb.mdb", dbLangGeneral)
CreateDatabase = True
ErrorHandler:
If Not db Is Nothing Then db.Close
End Function
If I run the code manually, no errors appear, and no database created, if I
try and run the module via a macro, get an error message cant find function,
I am very confused
Cheers Dm
via a macro call upon a module, which will create a temporary database, the
code I'm using is this code
Public Function CreateDatabase()
Dim db As Database
On Error GoTo ErrorHandler
Set db = DBEngine.CreateDatabase("c\ tmp\mydb.mdb", dbLangGeneral)
CreateDatabase = True
ErrorHandler:
If Not db Is Nothing Then db.Close
End Function
If I run the code manually, no errors appear, and no database created, if I
try and run the module via a macro, get an error message cant find function,
I am very confused
Cheers Dm