Results 1 to 4 of 4

Thread: How can I open a access file in Visual Basics?

  1. #1
    Join Date
    Nov 2009
    Posts
    60

    How can I open a access file in Visual Basics?

    Hi All,

    I am designing simple Visual Basics projects. In which I need to open a access database in the visual basics. But unfortunately I am not aware about how to open a access file in Visual Basics. For this I have read some VB books,but it doesn't helpful. Please let me know how can I get solution over this problem? I am waiting for your reply.

  2. #2
    Join Date
    Feb 2008
    Posts
    1,852

    Re: How can I open a access file in Visual Basics?

    Hi,

    I am providing the code which will open the access database file into the Visual Basics, Copy this VB code and use on your system:


    Dim AccessDemo As New access.application

    Dim allMCR As String = "Check"

    AccessDemo = CreateObject("Access.Application")

    AccessDemo.Visible = True

    AccessDemo.OpenAccessProject("d:\path\AccessFileName.mdb")

    AccessDemo.DoCmd.RunMacro(allMCR)

    End Sub

  3. #3
    Join Date
    Jan 2008
    Posts
    1,521

    Re: How can I open a access file in Visual Basics?

    Hi Friend,

    I had similar outlook issue with the Html. Surprisingly the problem was in the Internet Explorer. The version of Internet explore which you are using to run Html file may cause error. To overcome this Html issue I recommend you to use Internet Explorer version 6. As Internet Explorer 6 is fully compatible with the interconnection of the Html and Outlook.

    For more detailed solution over this issue please visit below link:
    http://support.microsoft.com/kb/312542

  4. #4
    Join Date
    Apr 2008
    Posts
    1,948

    Re: How can I open a access file in Visual Basics?

    Hi,

    There are mainly two ways to include access database in VB. Either you can use Data connection OR ADODB connection. You can use Data connection if you want to use the database which is created within VB. And if you want create the database connection to access database use ADODB connection.

    To open the access database using ADODB connection, you will need to provide the connection string. Below is the example of the connection string, in which connection string open the access database which has name "AccessTest.MDB":
    "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=\\cse1\src\AccessTest.MDB; Mode=Share ; User Id=adminst;Password=;"

Similar Threads

  1. Replies: 3
    Last Post: 23-10-2011, 05:17 PM
  2. Problem in Ms Access In Visual Basic
    By Kushan in forum Software Development
    Replies: 3
    Last Post: 19-03-2009, 02:31 PM
  3. Unable to open project in Visual Studio
    By Harding in forum Windows Software
    Replies: 3
    Last Post: 16-02-2009, 12:15 PM
  4. Microsoft Access cannot open file on network place
    By PJJB in forum Windows Update
    Replies: 2
    Last Post: 06-12-2006, 08:18 AM
  5. Java Programming Language Basics: Reflection Basics and Class Class
    By mayuri_gunjan in forum Guides & Tutorials
    Replies: 6
    Last Post: 29-08-2005, 12:04 AM

Tags for this Thread

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
  •  
Page generated in 1,714,052,688.40547 seconds with 17 queries