Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Access Programmes From VB6

Status
Not open for further replies.

smithph

Technical User
Oct 27, 2000
57
GB
Hi,
Is it possible to use buttons on a VB form to actually run an Access2 and/or Access 2000 programme rather than just link to tables etc?
If it is possible some sample code would be helpful and appreciated.
Regards
Phil Smith
 
referenties to Access 9.0 Object Library

Public appAccess As New Access.Application
Global strPath As String
Global strAccessFile As String
Global sTmp As String
Global sTable As String
Global Destination As String

Dim password As String
password = "edderic"
Dim db As DAO.Database

Rem ** Bepalen van de locatie van de applicatie
strPath = IIf(Right$(App.Path, 1) <> &quot;\&quot;, App.Path & &quot;\&quot;, App.Path)
strAccessFile = &quot;Scriptie01.mdb&quot;
Set db = appAccess.DBEngine.OpenDatabase(strPath & strAccessFile, False, False, &quot;MS Access;pwd=&quot; & password)
appAccess.OpenCurrentDatabase strPath & strAccessFile
Set db = Nothing
appAccess.DoCmd.OpenForm &quot;Switchboard&quot;

Rem ** ACCESS ZICHTBAAR MAKEN
appAccess.Visible = True

Its open a database with a password and a Switchboard


Eric De Decker
vbg.be@vbgroup.nl

License And Copy Protection AxtiveX.

Download Demo version on my Site:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top