Access Help for AcCommands?

Keith Nichols

Registered User.
Local time
Today, 17:13
Joined
Jan 27, 2006
Messages
431
Hi Folks,

Is there anywhere in help that describes acCommands in detail. Clicking F1 while an AcCommand is highlighted only gets you into the 'Microsoft Access Constants' listing where you can find the constant value but not what the comand actually does. eg:

acCmdAppMinimize 11

This particular command isn't behaving quite how I expected and I wanted to work out why, or at least try to before posting a question :)
 
This is how you would call the command...

DoCmd.RunCommand acCmdAppMinimize

Here is a site that might help explain the constants... Conquer Access RunCommand Constants
 
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.
 
My assumption is that because it is popup, maximized, and first opened, Access is assuming it is primary and placing it's focus first...or maybe it's the reverse order of the opened objects. Either way, given your current architecture, I would stick with passing the identity of the form that called the minimize event so that on restore you can also reset the focus and window state.
Keith Nichols said:
a test for open forms
Application.CurrentProject.AllForms("tgtFormName").isLoaded property
 
using one pop-up maximized form as a background which all other forms pop up on top of
Why?

You can easily custom colorize the Access window and hide the menu bars and tool bars to give your application a custom [non Access] look. Check out my changebackgroundcolor.zip sample I posted in this thread on how to do it... Colour

Here is another good thread on customizing... Hiding Database Window

Regardless... Your application should be secured so that nobody but the programmer can get inside it to access the database objects.
 
Thanks Guys,

I have checked out Steve Lebans site and the latest version of the utility supports using a bitmap as the background. :) This may be in the version that GHudson posted as there are some mentions of bitmaps in the code.

http://www.lebans.com/changemdibackground.htm

Anyway, if I can get this to work, it will resolve the primary problem of having my pop up forms appear on top of a background image.

The database is secured from meddling fingers with the security and with the there being no way for users to close the background form. I will follow up on the many hiding database objects threads to do this properly.

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

The latest version of Steve Lebans sample db worked very well. It took me a while to strip out the reams of code that wasn't relevant to my DB (there may still be some left in there). Now I have a single bitmap image in the DB directory sized for the highest resolution of my users and hard coded into the DB. Image loads up with the splash screen and everything else appears on top of that.

Over the next couple of weeks I may a ad a list box to my DB utilities form so that users can select 1 of 4 differently sized images to use in their FE so that it doesn't run off the left hand side & bottom of screen.

Thanks for the pointers
 
Last edited:

Users who are viewing this thread

Back
Top Bottom