Solved

What is the VBA code to minimize a form?

Posted on 2003-11-04
6
4,156 Views
Last Modified: 2010-08-05
Hi Experts,

What is the VBA code to minimize a form? Thanks
0
Comment
Question by:indyng
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 18

Expert Comment

by:lludden
ID: 9680366
DoCmd.Minimize
0
 
LVL 10

Accepted Solution

by:
perkc earned 20 total points
ID: 9680390
docmd.SelectObject acForm,"FormName"
docmd.Minimize

perkc
0
 
LVL 1

Author Comment

by:indyng
ID: 9680430
Where is the comment?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Expert Comment

by:bknouse
ID: 9680455
Just a few notes to the solution from lludden....

The object being minimized is the current selected form.  If the current selected form is not the form you want minimized, you must first make the form to be minimized the current selected form.

Minimizing a form puts an icon for the form on the task bar.  You may essentially do the same thing using the visible property of the form or using the hide method for the form.  These versions do not put an icon on the task bar.

Brent
0
 
LVL 39

Expert Comment

by:stevbe
ID: 9680464
from a command button's click event on the form you want to minimize

Private Sub cmdMin_Click()
   DoCmd.RunCommand acCmdDocMinimize
End Sub

from a command button's click event to minimize the entire application
Private Sub cmdMin_Click()
   DoCmd.RunCommand acCmdAppMinimize
End Sub

Steve
0
 
LVL 10

Expert Comment

by:perkc
ID: 9680494
I just assumed you only needed the code.

Sorry to have seemed hasty:)
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

697 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question