This example creates a microsoft access database. You need to add a reference to the Microsoft DAO 3.5 library.
'create a Microsoft Access database
'Add a reference to the Microsoft DAO 3.5 library
Private Sub Form_Load()
Dim ws As Workspace
Dim db As Database
Set ws = DBEngine.Workspaces(0)
Set db = ws.CreateDatabase("test.mdb", dbLangGeneral & ";pwd=Password")
End Sub