Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximizing a Window

Status
Not open for further replies.

cscott

Programmer
Feb 28, 2002
7
US
Here is my script. It works okay except when opening the Access.8 file, when the file opens only the title bar is visible in the upper left hand part of the screen. The Access.10 part works fine. I have macros in the database to maximize, etc. but none of them work. I have also tried to execute the macros from the script. This is the last thing I have to get figured out and then my chore is done. Any ideas will be greatly appreciated.

<Script Language=&quot;vbscript&quot;>


Dim KeyName,strMDEValue,objaccess

Set WshShell =CreateObject(&quot;WScript.Shell&quot;)
KeyName = &quot;HKEY_CLASSES_ROOT\.mde\&quot;
strMDEValue = WshShell.RegRead(KeyName)

If strMDEValue= &quot;Access.MDEFile.8&quot; Then
Set objaccess = CreateObject(&quot;Access.MDEFile.8&quot;)
objaccess.visible=True
objaccess.OpenCurrentDatabase &quot;\\echne\north_db\Fpdb\Print97.mdb&quot;
Set WshShell= nothing
Set objaccess=nothing
window.close()


ElseIf strMDEValue= &quot;Access.MDEFile.10&quot; Then
Set objaccess = CreateObject(&quot;Access.MDEFile.10&quot;)
objaccess.OpenCurrentDatabase &quot;\\echne\north_db\Print2002.mde&quot;
objaccess.visible=True
objaccess.UserControl = True
Set WshShell= nothing
Set objaccess=nothing
window.close()
End If

</Script>
 
in your script, try

objAccess.DoCmd.Maximize

(for at least Access97).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top