External databases

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rcollins
    New Member
    • Aug 2006
    • 234

    External databases

    I have probably about 30 databases. Each of these have their own front end. Different users have different databases they use. I want to make up a front end for each department so they can access the databases they need. I know this can be done by hyperlinks to open the individual databases, but I woul drather be able to do this within the front end databse for each department. Is this possible?
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    In general we do this using linked tables.
    When your users just need to switch between whole databases, then you could look into using code for setting the current database to another .mdb. For this check the helpfile on the subject of WorkSpaces.

    Nic;o)

    Comment

    • rcollins
      New Member
      • Aug 2006
      • 234

      #3
      We already have the tables linked throughout the 30+ databases. Let me try to be a bit more specific. We have triage.mdb, officesupplies. mdb, mailinglables.m db, cmdatabase.mdb which all have thier own front ends. I want reception to be able to access all four of these through a single front end. My hopes for this is that, because some departments can use up to 10 of the databases, that they dont have mdb icons all over the place, they can open the one and access all of the info they need.

      Comment

      • nico5038
        Recognized Expert Specialist
        • Nov 2006
        • 3080

        #4
        There's no limit to link tables to different .mdb's.
        Thus one front end can be linked to the tables of all back end databases.
        It's the needed functions/forms that should be giving the guideline which tables should be linked.
        Personally I did create multiple front-ends based on the same back end, but the other way around is no problem either.

        Nic;o)

        Comment

        • ADezii
          Recognized Expert Expert
          • Apr 2006
          • 8834

          #5
          Originally posted by rcollins
          We already have the tables linked throughout the 30+ databases. Let me try to be a bit more specific. We have triage.mdb, officesupplies. mdb, mailinglables.m db, cmdatabase.mdb which all have thier own front ends. I want reception to be able to access all four of these through a single front end. My hopes for this is that, because some departments can use up to 10 of the databases, that they dont have mdb icons all over the place, they can open the one and access all of the info they need.
          You can use the OpenCurrentData base() Method to open any existing, External, Microsoft Access database (.mdb) as the Current Database via Automation. The following code will Open the Sample Northwind Database from whatever Database you are actively in. Northwind will then be treated as the Current Database.
          1. Declare at the Modular, not Procedural, Level:
            Code:
            Dim appAccess As Access.Application
          2. Run similar code to open Northwind.mdb as the Current Database.
            [CODE=vb]
            'Initialize string to External Database Path.
            Const conPATH_TO_EXTE RNAL_DB = "C:\Program Files\Microsoft Office\OFFICE11 \SAMPLES\Northw ind.mdb"

            'Create new instance of Microsoft Access.
            Set appAccess = CreateObject("A ccess.Applicati on")

            'Open database in Microsoft Access window.
            appAccess.OpenC urrentDatabase conPATH_TO_EXTE RNAL_DB[/CODE]

          Comment

          • rcollins
            New Member
            • Aug 2006
            • 234

            #6
            So can I put this code under On_Click for a button? Or where would I use it to open the other database. When I put it with the button, it doesn't error but it doesn't open either. I put in my path R:\MDS_DBs\Misc \UIs\MailingLab el.mdb

            Comment

            • rcollins
              New Member
              • Aug 2006
              • 234

              #7
              While looking I noticed that I do have a .ldb file, but the database is not open anywhere and it will not let me delete it, says the database is in use and it won't let me in the database either

              Comment

              • ADezii
                Recognized Expert Expert
                • Apr 2006
                • 8834

                #8
                Originally posted by rcollins
                While looking I noticed that I do have a .ldb file, but the database is not open anywhere and it will not let me delete it, says the database is in use and it won't let me in the database either
                A Reboot should eliminate the .ldb File.

                Comment

                • rcollins
                  New Member
                  • Aug 2006
                  • 234

                  #9
                  So after looking at the individual databases I learned that there must be a form set to open when the database opens. I set this in each of them now they work. This will be great, thank you for your help with this issue

                  Comment

                  • ADezii
                    Recognized Expert Expert
                    • Apr 2006
                    • 8834

                    #10
                    Originally posted by rcollins
                    So after looking at the individual databases I learned that there must be a form set to open when the database opens. I set this in each of them now they work. This will be great, thank you for your help with this issue
                    You are quite welcome.

                    Comment

                    Working...