Executing another mdb file from a current mdb file....

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to execute another mdb file (another.mdb)
form a current mdb file (current.mdb)?

Thanks,
Fred
 
Try using FollowHyperlink

Dim MyDb as String
MyDb = "c:\DbName.Mdb"
Application.FollowHyperlink MyDb
 
Fred:

Depending on what you are trying to accomplish, you can also
programmatically open and manipulate another Access database through code.
The following example shows how to delete a form in another Access database
programmatically. The automation security level is temporarily reset to
avoid the security warning dialog box.

Function DeleteForm()
Dim acc As New Access.Application
Dim accAutoSec As MsoAutomationSecurity

'Capture current security setting
accAutoSec = acc.AutomationSecurity

'Reset the security to low temporarily to avoid the security warning
acc.AutomationSecurity = msoAutomationSecurityLow

'Open the database
acc.OpenCurrentDatabase ("C:\db2.mdb")

'Reset the security level
acc.AutomationSecurity = accAutoSec

'Delete the form
acc.DoCmd.DeleteObject acForm, "Form1"

'Quit the database
acc.Quit acQuitSaveAll

Set acc = Nothing
End Function

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


Is there a way to execute another mdb file (another.mdb)
form a current mdb file (current.mdb)?

Thanks,
Fred
 
Back
Top