Results 1 to 7 of 7
  1. #1
    khughes46 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Grapevine, TX
    Posts
    231

    Open another Access DB from within an already open Access DB


    Is there a way to open another Access DB from within an already open Access DB? After updating my back-end I would like to call the front-end to process the updated data.

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Yes, You can open other databases from within your current database.
    Here's a demo
    Code:
    '---------------------------------------------------------------------------------------
    ' Procedure : testdb
    ' Author    : Jack
    ' Created   : 12/8/2009
    ' Purpose   : Test opening second A2003 database.
    '---------------------------------------------------------------------------------------
    ' Last Modified:
    '
    ' Inputs: N/A
    ' Dependency: N/A
    '------------------------------------------------------------------------------
    '
    Sub testdb()
    
          Dim dbsCurrent As DAO.Database
          Dim dbsSecond As DAO.Database
          Dim tbl As DAO.TableDef
    10       On Error GoTo testdb_Error
    
    20    Set dbsCurrent = CurrentDb
    30    Set dbsSecond = DBEngine.Workspaces(0).OpenDatabase("c:\users\mellon\downloads\EquipInventoryOrLocation.mdb")
    40    Debug.Print dbsCurrent.name
    50    Debug.Print dbsSecond.name
    
    60    For Each tbl In dbsSecond.TableDefs
    70    Debug.Print "  " & tbl.name
    80    Next
    90    Debug.Print Now()
    
    100      On Error GoTo 0
    110      Exit Sub
    
    testdb_Error:
    
    120       MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure testdb of Module Module5"
    
    End Sub
    But I'm not sure what this really means
    After updating my back-end I would like to call the front-end to process the updated data.
    From within your frontend, you could open the second database, get whatever info you need and execute some process that could update your backend. This would imply 3 databases:
    -your frontend (that you would open first)
    -the second database from which you need some info
    -the third database (your backend) which contains the tables (linked) that you want to update.

    But maybe I have misunderstood your intent.

  3. #3
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    If the front-end and back-end are already linked, I don't think that would be necessary. The changes should be evident immediately, You may just need to close your object and re-open it to refresh the data.

  4. #4
    khughes46 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Grapevine, TX
    Posts
    231
    I have weekly letters to print from the Front End after the Back End is updated. I'm trying to set it up so someone not familiar with Access can process the letters. I have written instructions so that same someone can update the Back End first. It would be nice if the didn't also have to locate and open the Front End. This is a :Nice to Have" option, not "Must Have".

  5. #5
    khughes46 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Grapevine, TX
    Posts
    231
    I just need to print letters from the Front End after the Back End is updated. Only two files are involved.

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    What, then was the importance of opening a second database?
    If you have a split database -which means every user has their own copy of the FRONT END on their PC, and there is a single BACK END database on a server. The FRONT END is linked to the Tables in the BACK END. There are no tables in the FRONT END.

    Please explain what is involved in the Updates.
    Where does the data to be used for the update come from?
    How does the update process work --step by step?
    How does the process of printing letters work -- step by step?

  7. #7
    khughes46 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Grapevine, TX
    Posts
    231
    Download data from a website to Excel (7 files in all):
    Absences
    Excused Absences
    Tardies
    Class schedules
    Currently active students (SDE)
    All students enrolled since the start of the school year (SDE_YTD)
    Each file is imported into Access (appended to the appropriate table)
    Other subordinate files student ID's appended to them using SDE
    The SDE_YTD is not needed for the letters.
    However data from the other files is required for all absences and tardies and classroom numbers and sessions (we have 3, AM Mid and NT)
    We have 6 campuses that require individual letters for students getting letters (adult age >18, minor <19)
    Hope that helps the understanding.
    Please remember, I have some users that don't have a clue about Access, so I have to try to make it as much point and click as possible.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 06-25-2014, 10:29 PM
  2. Replies: 12
    Last Post: 07-25-2013, 12:49 PM
  3. Open Access DB via a Hyperlink
    By Kirsti in forum Access
    Replies: 0
    Last Post: 09-06-2012, 04:45 PM
  4. Replies: 11
    Last Post: 08-29-2012, 11:00 AM
  5. Replies: 1
    Last Post: 06-04-2009, 07:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums