D
Dangermouse
Hi
Using Access 2003
I'm trying to create a database on the fly using VB code, but I am
struggling, and with my knowledge with VB being V little, I feel like I am
drowning.
Via a macro I am calling a procedure, but it fails saying unknown function?,
If I run it manually, the procedure runs but no DB built
here is the 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
Thanks in advance Dm
Using Access 2003
I'm trying to create a database on the fly using VB code, but I am
struggling, and with my knowledge with VB being V little, I feel like I am
drowning.
Via a macro I am calling a procedure, but it fails saying unknown function?,
If I run it manually, the procedure runs but no DB built
here is the 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
Thanks in advance Dm