AUtomation ms Access VBA

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Skywalker
    New Member
    • Sep 2006
    • 7

    AUtomation ms Access VBA

    hello all
    I have one problem. I have lost 2 days with browsing but no possitive effect :(
    Description:
    I have database A - (dbA) and database B (dbB). I want from some form of dbA call procedure, which checks, other instance of MS access with dbB is running...if not, then creates new instance and opens this database. And the same also in reverese: run check from dbB if dbA is opened on current computer and if not, opens it.
    I have no idea how to do this... i have spent days with AUTIMATION and access.applicat ion object and methods GetObject(),Cre ateObject...Mai n problem is, that GetObject doesn't garantee which instance it chooses(in best case it returns needed dbB from dbA or dbA from dbB)... Maibe some cooperation of API and Automation can handle this , i am not sure...Please, help me if you can...Zdeno
  • PianoMan64
    Recognized Expert Contributor
    • Jan 2008
    • 374

    #2
    What in each database are you checking to see is available in each database or are you wanting to simply check if they are running on your local machine?

    Comment

    • Skywalker
      New Member
      • Sep 2006
      • 7

      #3
      I would like to see, if there is the seconfd database running...from dbA see if dbB is running and from dbB if dbA is running

      Comment

      • PianoMan64
        Recognized Expert Contributor
        • Jan 2008
        • 374

        #4
        So my next question is how do you want to deal with when each database exist but is not running, do you want to blank out the whole database and start over again and create the database and table, queries, forms and whatever else your talking about in the another copy of the database?

        I would really like to see what you're really talking about between these two independent databases. I don't understand what is in each of them and why they have to have this co-dependency between the two.

        Thanks,

        Joe P.

        Comment

        • Skywalker
          New Member
          • Sep 2006
          • 7

          #5
          Hi. Thanks for your interest..so, I will try to explain it as much as I can....This utility is needed for my job. There is one workplace in plant, where tvo different databases ase needed for operator's work - he is inserting data via barcode. So, one database is something like warehouse system, another one like maintenance database. There is no datarelation between them, there are different entities without any relation inside them...So it is solved like 2 different applications... I just want to call start or focusing of one database from the other, when operator presses for example F7 key.F7 key will be used like user's input to activate another database /maximize its mainscreen if it is running or start it if it was not started yet/. I just want to eliminate tasbar icon clicking which can be in real production in plant considered like delay of production...th is is not my idea but idea of my supervisor. I hope you understand...

          Comment

          • PianoMan64
            Recognized Expert Contributor
            • Jan 2008
            • 374

            #6
            Hey Skywalker,

            Thanks for the explanation.

            Well, first off, if you are trying to launch an application from another computer, that's just not supported over a network period. This is something that has to be launched at the workstation that is going to be hosting the application.

            As for the backend of things, I would REALLY suggest that you break apart the Frontend and Backend of the database so the tables are located in a central Network Share location where both users would have Full rights to the folder.

            I would also REALLY suggest, that you merge all the tables from the two databases that you're talking about into one backend database in this network share location, that way if you're running the front end from anywhere on the network, you would have access to the data that you're wanting to access.

            One thing I did want to make clear about the MS Access databases is that you are able to connect to another MS Access database simply by using the LINK OBDC feature within Windows.

            From your explanation, you simply don't need either of the two programs running simultaneously unless the other user is entering data into his/her respective front end application.

            You can simply just run your front end application and connect to the network share and when the other user connects to the network share when they log in, they would put their data in their respective tables, and you can use that data to do what you need to do with your respective tables in the centralize network share.

            If you need more detailed explanation, please let me know,

            Thanks,

            Joe P.

            Comment

            Working...