i have two databases one is the main front end that the users see, behind that is a reporting database that runs queries that export to Excel and create charts.
the first database has a button that runs the queries in the 2nd database, but at the moment you get the security warning and have to physically open the 2nd database.
I want the button when pressed to automatically open the 2nd database without any human intervention and run the queries in the background.
Is this possible, I do not want to put all the tables and queries in the first database.
Any help would be appreciated.
Dim appAccess As Access.Application
Set appAccess = CreateObject("Access.Application")
.Visible = False
appAccess.DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "qry-tbl_001", strfile
Set appAccess = Nothing