Shell Command Problem

DanG

Registered User.
Local time
Today, 04:51
Joined
Nov 4, 2004
Messages
477
I have the following on a button...
Shell ("Q:\APPS\Microsoft Office\OFFICE11\MSACCESS.EXE X:\NWRBugetDB\2006Budget\BudgetDatabase.mdb",vbMaximizedFocus).

And get the following error message:
"Compile error Syntax error"
Wheh I take the "vbMaximizedFocus" out of it, it works fine. I have seen the same code with a 1,2,3...instead of "vbMaximizedFocus" but that does not work either (The MS Access help says to use 1,2,3..but when entering the code I get the "vbMaximizedFocus" and other similar choices in a dropdown menu)
Very confusing. In the end I wand the database open "Maximized".

Any help would be great.
Thank you
 
Add:
DoCmd.Maximize
To the Form_Load() of whatever form you have set to autoopen. As to opening, I'd prefer:
Code:
Private Sub Button_Click()
   Dim appAccess As Access.Application
   Set appAccess = CreateObject("Access.Application")
   'Open database in Microsoft Access window.
   appAccess.OpenCurrentDatabase "X:\NWRBugetDB\2006Budget\BudgetDatabase.mdb"
   DoCmd.RunCommand acCmdExit
End Sub
 
Not that simple.
What happens:
New database opens, old database then closes, password screen comes up for new database, MS Access minimizes while password form to new database stays up, user enters password, password form closes and MS Access still mimimized.

Side note:
I am on Citrix and have noticed I can minimize MS Access while my current form stays open in front of me. I can not duplicate this on my local drive.

Why does the "vbMaximizedFocus" or "1,2,3..." not work?
 
Got It!
Needed "Call Shell(...)"
I just had "Shell(...)"

Thanks!
 

Users who are viewing this thread

Back
Top Bottom