Create new Database with VBA that is already set to "Tabbed Documents" view.
Hi!
Does anyone know of a way to create a new Database with VBA that is already set to "Tabbed Documents" view.
OR is there a way to use VBA to set the view of another database to "Tabbed Documents" view.
Here's what I am trying to accomplish:
I have a database with a form that allows you to pick a .csv file, and it will automatically import it into access using a saved import specification.
After the data is imported, it is then exported into a new database to be distributed to someone else.
The new database view is set to "Overlapping Windows" by default.
So, I would like to either have it created with "Tabbed Documents" view, or be able to change it to "Tabbed Documents" view after it is created, by using the VBA in the original database.
Here's a little bit of the code that I am using:
Thanks for your help!
Hi!
Does anyone know of a way to create a new Database with VBA that is already set to "Tabbed Documents" view.
OR is there a way to use VBA to set the view of another database to "Tabbed Documents" view.
Here's what I am trying to accomplish:
I have a database with a form that allows you to pick a .csv file, and it will automatically import it into access using a saved import specification.
After the data is imported, it is then exported into a new database to be distributed to someone else.
The new database view is set to "Overlapping Windows" by default.
So, I would like to either have it created with "Tabbed Documents" view, or be able to change it to "Tabbed Documents" view after it is created, by using the VBA in the original database.
Here's a little bit of the code that I am using:
Code:
strUserFileName64 = InputBox("Please Enter the New DATABASE Name:")
globalstr = strUserFileName64
Set objShell = CreateObject("WScript.Shell")
GetDesktopFolder = objShell.SpecialFolders("Desktop")
Set objShell = Nothing
ADOXcatalog.Create "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & GetDesktopFolder & "\Database\" & strUserFileName64 & ".accdb"
tempstring = GetDesktopFolder & "\Database\" & globalstr & ".accdb"
DoCmd.TransferDatabase acExport, "Microsoft Access", tempstring, acTable, functionstr64, tblname, False
DoCmd.TransferDatabase acExport, "Microsoft Access", tempstring, acQuery, "Query1", "Query1", False
Thanks for your help!