Results 1 to 2 of 2

Thread: Opening Access within VB.Net

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Location
    New Hampshire, USA
    Posts
    15

    Opening Access within VB.Net

    I,m very new to VB. I'm actually trying to teach myself right now. I have a little problem. I want to open Access using a button control in a program that I'm building in VB.Net. Is this possible? Any help on this matter would be appreciated.
    Thanks
    BAE

  2. #2
    Junior Member
    Join Date
    Dec 2003
    Location
    California
    Posts
    19
    Add a reference to your project for Microsoft access using:
    Project|Add Reference|COM|Microsoft Access <version> Object Library.
    Hit "Select" then "OK"

    In the click event for your control


    Code:
    Dim mAccess as Access.Application = new Access.Application()
    mAccess.Visible = True
    mAccess.Application.OpenCurrentDatabase("your path",False)
    Hope this helps

Posting Permissions

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



Click Here to Expand Forum to Full Width