Results 1 to 2 of 2

Thread: How can I...

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    2
    How can I, using VB, to open a database file in Microsoft Access? I just want a command button that opens up Access and the database file. Can someone please help? Thanks in advance!!!

  2. #2
    Guest
    Code:
    Private Sub Command1_Click() 
    Dim oAccess As Object 
    
    Const DBName = "C:\My Documents\db.mdb" 
    
    Set oAccess = CreateObject("Access.Application") 
    
    oAccess.OpenCurrentDatabase (DBName) 
    
    Set oAccess = Nothing

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