i am trying to create a button that will open a database from a vb6 system. I have got so far but i dont know what is meant to go instead of Database

Option Explicit
Dim ACC As Access.Application

Private Sub btnDatabase_Click()
Set ACC = New Access.Application
ACC.Database.Open ""
ACC.Visible = True

End Sub

would any1 be able to help?
thnx andy

Recommended Answers

All 2 Replies

hi. you can use shell command.try this

Shell ("C:\\Program Files\\Microsoft Office\\OFFICE10\\MSACCESS.EXE ""D:\db1\database\db1.mdb")

thnks very much, that worked just fine :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.