Thanks for the replies Gents.
Ted,
I am using the DoCmd.RunCommand acCmdAppMinimize to minimize the whole application rather than just the form the button is on. I think docmd.minimize will just minimize the form it is on.
ghudson,
Thanks for the link. This site explains what the AcComands are but not the full skinny on how to use them.
My actual problem is this: I am using one pop-up maximized form as a background which all other forms pop up on top of. The AcCmdAppMinimize function triggered by a button on the top or front form minimizes the database as required but sometimes (it didn't always, but I can't figure out what I changed!!!) when I restore the DB the maximized background is in front of the form the user needs to see.
If I set the user form to Modal Yes, the AcCmdAppMinimize doesn't work. I was hoping that a fully documented help might have given me a pointer to a solution.
All I can think of so far is some procedure that fires on the resize event of the background form when the database restores (the fixed size form does not appear to have an onload, on activate, or on resize event when the db restores) to detect the other open form (there are only ever 2 forms open - the background and the currently used form) and then set the focus to the form.
Alternatively, there might be some method of storing the current form identity in a public variable from the on click event of the minimize app command button and using this to set the focus to the user form.
Unfortunately I don't really know do the crucial bit of either of those possible solutions. That is: a test for open forms or storing the current form's name from an onclick event.
Of course, there is always the very real possibility that this problem has been solved a thousand times over and there is a more sensible solution, but that is where I am at at the moment.
As ever, any pointers gratrefully recieved.