Windows - Activate .mdb

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

Guest

When I have 2 mdb's open, one is maximized on screen, the other minimized.
How do I, using code have one activate the other so it becomes maximized.

much thanks...
 
This should give you access to another existing database.

Dim appAccess As Access.Application

Sub DisplayForm()
Const strConPathToSamples = "C:\TestApp\"

Dim strDB As String

' Initialize string to database path.
strDB = strConPathToSamples & "db1.mdb"
' Create new instance of Microsoft Access.
Set appAccess = CreateObject("Access.Application")
' Open database in Microsoft Access window.
appAccess.OpenCurrentDatabase strDB
' Open Orders form.
appAccess.DoCmd.OpenForm "Form1"
appAccess.Visible = True
appAccess.DoCmd.Maximize
End Sub
 
Back
Top