From VB or VBScript I can create an Access object, and also create tables and queries using ADOX.
How can I create a module in the Access file? I've found that the below code lets me *add* to an existing module, but I want to create the module first and then add code to it from a file.
Dim oAccess As New Access.Application
With oAccess
.OpenCurrentDatabase "C:\MyDatabase.mdb"
.Modules("ExistingModule").AddFromFile "C:\MyModule.bas"
End With
Thanks!
How can I create a module in the Access file? I've found that the below code lets me *add* to an existing module, but I want to create the module first and then add code to it from a file.
Dim oAccess As New Access.Application
With oAccess
.OpenCurrentDatabase "C:\MyDatabase.mdb"
.Modules("ExistingModule").AddFromFile "C:\MyModule.bas"
End With
Thanks!