DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 1 of 1

Hybrid View

  1. #1
    Join Date
    Jul 2011
    Posts
    0

    Running queries in a 2nd Database, but keeping it hidden

    Hi

    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.
    Code:
    Dim appAccess As Access.Application
    
    Set appAccess = CreateObject("Access.Application")
    With appAccess
        DoCmd.SetWarnings False
        .Visible = False
        .OpenCurrentDatabase strdb    
    End With
    appAccess.DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "qry-tbl_001", strfile
    appAccess.CloseCurrentDatabase
    Set appAccess = Nothing
    Attached Images

Similar Threads

  1. Database not properly created
    By Arjuna in forum Database
    Replies: 2
    Last Post: 07-25-2007, 03:22 AM
  2. XML files vs Database
    By Mansoor in forum XML
    Replies: 8
    Last Post: 08-23-2002, 04:35 PM
  3. Really Cool 3 tier Java database solution
    By Russ in forum Database
    Replies: 0
    Last Post: 06-04-2002, 12:57 AM
  4. Database Security General Discussion
    By Michael Tzoanos in forum Database
    Replies: 0
    Last Post: 04-12-2002, 11:19 AM
  5. queries
    By tom in forum Database
    Replies: 22
    Last Post: 04-27-2001, 12:48 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links