B
B Karthick
Dear Experts and MVPs,
1) I want to create new backend database (for every year)
2) I have a backend boiler plate database "2005-2006.mdb"
3) I have a frontend database "ForwaderPro.mdb"
4) I have a data selection form "frmSelectYear" in the front end
5) I have a command button "cmdCreate" in the data selection form
Given below is its code ....
dim wrk as workspace
dim dbs as database
dim str as strdbsName
' some code here
Set dbs = wrk.CreateDatabase(strdbsName, dbLangGeneral)
wrk.OpenDatabase (strdbsName)
DoCmd.TransferDatabase acImport, "Microsoft Access", _
"2005-2006.mdb", acTable, "Billing", "Billing", structureonly:=True
' some code here
I have successfully compiled the above code and can create the backend
database through mouse click of "cmdCreate". When I import through
DoCmd.TransferDatabase, I intend to import the table from the boiler
plate database into the "Newly Created Database" and not in the
currentdb from which I am running the VBA code.
Can you guide me on how this can be done? Thanks for your usual
support.
Best Regards
B Karthick
Access Addict
1) I want to create new backend database (for every year)
2) I have a backend boiler plate database "2005-2006.mdb"
3) I have a frontend database "ForwaderPro.mdb"
4) I have a data selection form "frmSelectYear" in the front end
5) I have a command button "cmdCreate" in the data selection form
Given below is its code ....
dim wrk as workspace
dim dbs as database
dim str as strdbsName
' some code here
Set dbs = wrk.CreateDatabase(strdbsName, dbLangGeneral)
wrk.OpenDatabase (strdbsName)
DoCmd.TransferDatabase acImport, "Microsoft Access", _
"2005-2006.mdb", acTable, "Billing", "Billing", structureonly:=True
' some code here
I have successfully compiled the above code and can create the backend
database through mouse click of "cmdCreate". When I import through
DoCmd.TransferDatabase, I intend to import the table from the boiler
plate database into the "Newly Created Database" and not in the
currentdb from which I am running the VBA code.
Can you guide me on how this can be done? Thanks for your usual
support.
Best Regards
B Karthick
Access Addict