DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Visual Basic 4 / 5 / 6 (http://www.daniweb.com/forums/forum4.html)
-   -   opening a database from vb6 (http://www.daniweb.com/forums/thread152421.html)

andyhopper Oct 20th, 2008 5:10 pm
opening a database from vb6
 
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

AUGXIS Oct 21st, 2008 2:23 am
Re: opening a database from vb6
 
hi. you can use shell command.try this
Shell ("C:\\Program Files\\Microsoft Office\\OFFICE10\\MSACCESS.EXE ""D:\db1\database\db1.mdb")

andyhopper Oct 21st, 2008 7:57 am
Re: opening a database from vb6
 
thnks very much, that worked just fine :)


All times are GMT -4. The time now is 2:46 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC