Solved

Show form most than one time

Posted on 2004-08-04
5
243 Views
Last Modified: 2010-05-02
How can I show a Form for more than one time??

Form1.show

I want to show the same form for more time..


THanks!
0
Comment
Question by:leekf
[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
5 Comments
 
LVL 5

Expert Comment

by:ZenMasterrr
ID: 11713547
not sure what you mean, do you mean you want to duplicate ?
0
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 11713564
...
Dim frm As New Form1
frm.show
...

?
0
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 11713568
or

...
Dim frm As Form1
Set frm = New Form1
frm.show
...
0
 
LVL 3

Accepted Solution

by:
TILL earned 50 total points
ID: 11713764
If you wish to show a form more than once, this meaning that you want to have multiple form instances active, you have to create and show multiple instances. You can do this by performing the following:

Dim frm1 as MyForm
Dim frm2 as MyForm
Set frm1=new MyForm
Set frm2=new MyForm
Load frm1
Load frm2
frm1.Show
frm2.Show
...
' Do something here
...
unload frm1
unload frm2
Set frm1=nothing
Set frm2=nothing


The code from above displays 2 forms for a while (while that something is performing) and after that it closes both form instances and releases all the resources.
If you need more directions, please feel free to ask.

Regards,
TILL
0
 
LVL 18

Expert Comment

by:JR2003
ID: 11713846
Private Sub Command1_Click()

    ShowMyForm
    ShowMyForm

End Sub

Private Sub ShowMyForm()

    Dim f as frmMyForm
    Set f = New frmMyForm
    f.Show

End Sub
0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

728 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