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

G

Guest

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

Thanks,
Fred
 
G

Guest

Try using FollowHyperlink

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

David Lloyd

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top