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...
visdev1 - 28 Jan 2005 17:19 GMT
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
> 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...