+ Reply to Thread
Results 1 to 3 of 3

Open a access database using VBA

  1. #1
    Kryer
    Guest

    Open a access database using VBA

    I already know how to open an instance of Access using the
    application.ActivateMicrosoftApp = xlMicrosoftAccess. But what I havent been
    able to get is a way to just open a specific database from excel vba. I dont
    want to edit data from access to excel or vice versa. I just want a button
    that says start this specific database. The data base is stored under
    "C:\Data\Access\CustomerCare.mdb". Is any one able to help me with this.

  2. #2
    R. Choate
    Guest

    Re: Open a access database using VBA

    What are you trying to do? That will help avoid giving you an answer you don't want. I can give you ADO code for opening an instance
    of a specific db from Excel, but the purpose of the code is to run a query against data in the db and bring it over to Excel. You
    seem to be saying you don't want that. You also don't seem to want the database to just open up and appear on the screen, but I
    can't tell.

    --
    RMC,CPA


    "Kryer" <[email protected]> wrote in message news:[email protected]...
    I already know how to open an instance of Access using the
    application.ActivateMicrosoftApp = xlMicrosoftAccess. But what I havent been
    able to get is a way to just open a specific database from excel vba. I dont
    want to edit data from access to excel or vice versa. I just want a button
    that says start this specific database. The data base is stored under
    "C:\Data\Access\CustomerCare.mdb". Is any one able to help me with this.



  3. #3
    William Benson
    Guest

    Re: Open a access database using VBA

    Try Windows scripting maybe:


    Sub test()
    Dim objshell As Object

    Set objshell = CreateObject("Wscript.Shell")
    objshell.Run """C:\Program Files\Microsoft Office\Office11\MSAccess.exe"" "
    & _
    """C:\Program Files\Microsoft Office\Office11\Samples\Northwind.mdb""",
    1, False

    If Err.Number Then
    Wscript.Echo "Some horrible error: " & Err.Number & " (" &
    Err.Description & ")"
    End If

    End Sub



    "Kryer" <[email protected]> wrote in message
    news:[email protected]...
    >I already know how to open an instance of Access using the
    > application.ActivateMicrosoftApp = xlMicrosoftAccess. But what I havent
    > been
    > able to get is a way to just open a specific database from excel vba. I
    > dont
    > want to edit data from access to excel or vice versa. I just want a button
    > that says start this specific database. The data base is stored under
    > "C:\Data\Access\CustomerCare.mdb". Is any one able to help me with this.




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1