Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Location
    Lebanon
    Posts
    44

    Unanswered: Close an application from another

    Hi guys, I have 2 db files, db1.mdb and db2.mdb, there is a form (form1) in db1.
    I need to add a code to form1 that closes db2.mdb.
    It should start with something like
    Dim appAccess As Access.Application
    Set appAccess = CreateObject("Access.Application")
    then appAccess...
    Thank you
    Dani_30

  2. #2
    Join Date
    Apr 2006
    Posts
    157
    yup i believe the Access application object has a quit method

    appAccess.quit

    but if this doesn't work
    you might wish to go overkill
    find the handle for this db2.mdb window
    and close it via API
    Only quitters quit!

  3. #3
    Join Date
    Oct 2003
    Location
    Lebanon
    Posts
    44
    I tried AppAccess.Quit, but it closed db1 instead of closing db2.
    You're right, i should work on the handle.
    Thanks
    Dani_30

  4. #4
    Join Date
    Oct 2003
    Location
    Lebanon
    Posts
    44
    I tried the AppAccess.Quit, but it closed db1 instead of closing db2. I think you're right, i should use the handle.
    Dani_30

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •