Solved

Is there VBA coding to identify in a Form_Open Event that a DoCmd.Open "frmName" is being opened as hidden?

Posted on 2007-11-13
6
505 Views
Last Modified: 2013-11-27
I'm working with an Access database that may be opened in another form and want to know if the Form_Open Event can tell if its being opened as hidden or visible?

In other words, is there VBA coding to identify in a Form_Open Event that a DoCmd.Open "frmName" is being opened as hidden?
0
Comment
Question by:stephenlecomptejr
  • 3
  • 2
6 Comments
 
LVL 14

Accepted Solution

by:
ragoran earned 500 total points
ID: 20275613
have you try to test the property me.visible ?
0
 
LVL 65

Expert Comment

by:Jim Horn
ID: 20275677
Curiosity overwhelms me.. what is the purpose of opening a form as .Visible = False?  There are very few requirements I've seen where this is needed.
0
 
LVL 14

Expert Comment

by:ragoran
ID: 20275698
Personally, When I have a very large form that are used often, instead of closing the form, I hide them.  So when the user click on my menu to reopeon, I simply made them visible again... much faster

(I managed my own collection of "forms" to implement this behavior)

But I can't assume that it is the same for the asker.

0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 65

Expert Comment

by:Jim Horn
ID: 20281578
That, and if you want to have an event that fires every x time interval, that is best done with a hidden form, even though it hogs resources.

I've seen a lot of badly-designed apps that pass variables back and forth using hidden forms.
0
 
LVL 14

Expert Comment

by:ragoran
ID: 20283473
>> I've seen a lot of badly-designed apps that pass variables back and forth using hidden forms <<

Yuck!
0
 
LVL 1

Author Comment

by:stephenlecomptejr
ID: 20290700
>> I've seen a lot of badly-designed apps that pass variables back and forth using hidden forms <<

I've got a startup form that opens another form - that opens up several bound forms to speed up the access to data.  One of the bound forms happen to have combo box's recordsources adjusted upon opening and refuses to be visible until I used the above code.

If you think this is another badly-designed app - you guessed correctly.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now