Calling another access database

  • Thread starter Thread starter arm
  • Start date Start date
A

arm

Hello! Could anyone please help me for possible ways or codes to call
another database from a command button. I tried using the shell function
but I'm having a problem with pathname where the other database is located.
The pathname has spaces in between (such like "E:\Share - Materials\Yard
Only"). Thank you very much in advance. c",)
 
Good morning

Try the following:


Sub OpenExistingDataBase()
Dim retVal As Long
Dim AccPath As String
Dim DbPath As String

AccPath = "C:\Program Files\Microsoft Office\Office\MSAccess.exe"
DbPath = "D:\db1.mdb"

retVal = Shell(AccPath & " " & DbPath)

End Sub


Best Regards

Maurice St-Cyr
Micro Systems Consultants, Inc.
 
Back
Top