|
-
Nov 19th, 2007, 12:31 PM
#1
Thread Starter
Lively Member
[RESOLVED] Loading form
As a consequence of certain event, I have to load a form. But, if that form is already opened, I have to set the focus on it. How can I do this?
Thanks in advance!!!!
Last edited by JMuller; Nov 19th, 2007 at 12:52 PM.
-
Nov 19th, 2007, 12:33 PM
#2
Re: Loading form
The easy way
Code:
Private Sub Command2_Click()
Form2.SetFocus
End Sub
-
Nov 19th, 2007, 12:39 PM
#3
Thread Starter
Lively Member
Re: Loading form
Ok, you are right. But I've missed some information in my post. The form I have to call is a clonation from a standard form, so I have to determine if a form with certain data is loaded, and then decide what to do. Could you help me please?
-
Nov 19th, 2007, 12:40 PM
#4
Re: Loading form
To determine if it is loaded
Code:
Dim f As Form
For Each f In Forms
If f.Name = "Form1" Then MsgBox "Form1 already loaded"
Next
Replace the msgbox with the setfocus.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|