Open and maximixe frmMain when Access starts

  • Thread starter Thread starter George
  • Start date Start date
G

George

I have a desktop ap that opens to display the various object windows when it
starts. How do I make frmMain visible and maximized what Access starts? I
think that once there, F11 returns to the object windows. I want to take
the user directly to where he/she will work.
 
You can set the startup form in

tools->startup


You also notice a LOT of other options in startup..even to disable f11.

To made the form *always* be maximized, then in the forms on-load, you can
place the following line of code:

DoCmd.Maximize


I also going to re-post a post of mine in which I explain how you can "hide"
the access interface from your users.....

================================

You most certainly can, and should hide all of the ms-access interface. The
options to complete hide and keep people out of the ms-access interface can
easily be done using the tools->start-up options. Using those options allows
you to complete hide the ms-access interface (tool bars, database window
etc).

Also, using these options means you do not have to bother setting up
security.

Try downloading and running the 3rd example at my following web site that
shows a hidden ms-access interface, and NO CODE is required to do
this....but just some settings in the start-up.

Check out:

http://www.members.shaw.ca/AlbertKallal/msaccess/DownLoad.htm

After you try the application, you can exit, and then re-load the
application, but hold down the shift key to by-pass the start-up options. If
want, you can even disable the shift key by pass. I have a sample mdb file
that will let you "set" the shift key bypass on any application you want.

You can get this at:

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

Of course, during development, you will hold down the shift key so your
startup settings don't run. You then develop for awhile, and then to test in
"user" mode, you exit..and then re-enter the application without the shift
key bypassed. You will likely do this dance all day long as you run/test as
user mode, and then flip back in to developer mode (shift key used..so you
don't get the main custom menu). So, you can't develop, or really modify
things when you run your application with the startup settings...so you must
shift-by-pass them when you want to work.

And, in fact, I use alt-f4 to exit the application...the mdb file should
still be highlighted in the windows explore..so, then you hit enter key
(and, hold down shift key if you need be). This key stroke sequence and
exiting and re-entering the application will occur CONSTANTLY all day long
when you are developing.

When you finally have things just right...you create the mde
you plan to distribute...

So, you REALLY need to use the shift key to disable all of the user startup
settings which get in the way of developers (this is good, since you want to
run in "user mode" for end users, and to work, you need to work in
"developer mode".

And, if your going to use a mde, then you will have to split your applciaton
(unless you NEVER plan to makes changes and bug fixes to your exiting
appclation). So, usng a mde means you must split. I have a nice aritcle that
not only tells you to split, but explains **why** you should split...

http://www.members.shaw.ca/AlbertKallal/Articles/split/index.htm
 
Albert said:
To made the form *always* be maximized, then in the forms on-load, you can
place the following line of code:

DoCmd.Maximize

Albert,

Where do you put the DoCmd??

TIA
Rich W.
 
Albert,

Where do you put the DoCmd??

TIA
Rich W.

If that's all you want to do (no other preparations in the Open code), just
use a new Macro on the form's Load event. use the macro editor.
 
John,

Thank You.
Will check it tomorrow at work.
I do want to learn to program in Access.
I use to write basic and FoxPro (DOS version)
I just need a pointer in the right direction.

Rich W.
 
John,

Thank You.
Will check it tomorrow at work.
I do want to learn to program in Access.
I use to write basic and FoxPro (DOS version)
I just need a pointer in the right direction.

Well, the macro is fine for a one-liner like this, or something very limited.
If you want to really program, use Modules in VBA (Visual Basic for
Applications). There are some references at:

Jeff Conrad's resources page:
http://www.accessmvp.com/JConrad/accessjunkie/resources.html

The Access Web resources page:
http://www.mvps.org/access/resources/index.html

A free tutorial written by Crystal (MS Access MVP):
http://allenbrowne.com/casu-22.html

MVP Allen Browne's tutorials:
http://allenbrowne.com/links.html#Tutorials
 
Rich Wonneberger said:
Albert,

Where do you put the DoCmd??

Ok, here is the suggestion:
To made the form *always* be maximized, then in the forms on-load, you can
place the following line of code:

DoCmd.Maximize

Note above how i suggest to use the forms "on-load" event. So, the forms
on-load event is where we will palce the code. So, now, lets explain "how"
to get to the forms on-load event.

Open up the form in design mode, and then display the properties sheet for
that form (make sure the form is selected, not a control or part of the form
since that gives you the properties for that control).

if you *just* opened the form in design mode, then you can go
view->properties (if they are not already displayed...).

In the properties sheet, you click on the event tab. You will now see a list
of possbile events for the form in which you can enter/write code. Simply
click on the "on-load" event setting in that property sheet.

When you click on the on-load, you now see a buttion appear on the right
side that looks like [...]. Simply click on that button and you see 3
options

Expression Builder
Macro Builder
Code Builder

If you want to write a macro, choose Macro Builder, or to write code (vba),
the choose the code builder. (access has both ease to use macros (easier
then FoxPro code), and then also has the ability to allow you to write VB
code (often referred to as VBA).

The code window will appear, and you can type in that one command as per
above....
I use to write basic and FoxPro (DOS version)
I just need a pointer in the right direction.

Wonderful! I also did a good stint of work in FoxPro 2 and 2.6 for dos. That
means you done some coding and thus you are far ahead of most new users of
access. Writing code in ms-access is quite similar to FoxPro (the main
difference is many things "built-in" access in which you would have to write
code in FoxPro to do the same thing).
 
Back
Top