Force Maximize on Access Startup using .VBS by TC

P

petebeatty

I am using the script that TC wrote regarding by passing the security
warning. However, I need to force the maximization of the access
application. It currently starts in normal window mode.

How can I force the application to use the whole screen??
 
T

TC

Try one of these two ways:

(1) Put the following statement somewhere in the startup code of your
database:

Application.RunCommand acCmdAppMaximize

Or:

(2) Assuming that your script says this:

dim o
set o = createobject ("access.application")
(etc.)

Add the following line before the (etc.):

o.runcommand 9999

BUT: I can't remember the proper number to use in place of 9999. I
think it's 17, but I'm not sure (and I don't have Access here to chec).
To find the proper number, just start Access, press Ctrl-g to go to the
debug window, type the following command, then use the number displayed
by this command:

? acCmdAppMaximize

Method (1) is probably easier, and has the advantage that it will still
happen if the user chooses to ignore the script & open the database
directly.

HTH,
TC
 
P

petebeatty

Thanks for the note. However, it does not seem to work on my system.
I first tried the second option and modified the script file. No luck,
the app window does not maximiaze. I add the following line
immeridately after the creatobject line:

Obj.runcommand 10


I then when into the Logon form (set in the tools/startup) and add the
following command in the form_open event, first executible line:

application.runcommand acCmdAppMaximize

The interesting thing is that when I start from the script file, this
as no affect. However, when I start without using the script. It does
work.

What is happening? Any Ideas?
 
T

TC

Maybe the acCmdAppMaximize constant has different values in different
versions of Access? Start Access, type Ctrl-g to go to the debug
window, type the following command & check that the result is 10:

? acCmdAppMaximize

Also, show me the exact code you are using.

HTH,
TC
 

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