form not MoveSizing to 0" at initial startup

M

Matthew

My frmSwitchboard is set to open at startup. It runs a macro,
mcrSizeSwitchboard, both in the On Load and On Open events, which selects
the form, and MoveSizes it, specifying Down: 0".

Allow Built-in Toolbars is UNchecked.

When Access starts, before the database is opened, the Database Toolbar is
showing.

When I select my database and log in, the Database Toolbar disappears, but
frmSwitchboard does not move up where it should be, flush with the File Menu
Toolbar. This messes everything up, because the switchboard opens other
forms, but if the switchboard is too far down, the other forms obscure it.
The switchboard is only 0.5" tall.

Anytime after that point, if I run mcrSizeSwitchboard, frmSwitchboard moves
up to 0", where it should be.

Or if I compact & repair database, it moves up to 0", where it should be.

How can I get it to open flush at the top when Access starts??

Many thanks!!

Matthew
 
A

Adam Milligan

I typically just maximize my switchboards and them let the other
forms/reports pop up on top of it.

Adam
 
M

Matthew

Thank you, but I think I've found a workaround.

I started down that path, of leaving the switchboard maximized, but then
when it opened another form, one of two things happened. Either the new
form would open maximized too, or, if docmd.restore is part of the open
code, then both the new form and the switchboard would be "restored" to
their previous size. Perhaps this could have been dealt with by leaving out
the "restore" command, and sizing the new form specifically?

Anyway, the workaround I thought of works. I've created a small form. I
put a label on it that says "Loading...". I set its timer to 500
miliseconds (I tried 100, but that didn't have the desired effect). In the
On Timer event, I run a macro which opens the switchboard, sizes it, and
then closes my small form. Presto... Not super elegant, but it works.

Any other thoughts are most welcome!!

Thanks!!

Matthew
 

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