[AccessD] OT - Visual Basic 6.0 - Is Form Open

StaRKeY starkey at wanadoo.nl
Tue Jun 21 13:59:52 CDT 2005


Hi all, 

Also have a look at the form's objectstate in Access, you can use this also
instead of looping through each form, which could get lengthy. If I remember
right though I am not sure as of which Access version this functionality
exists.

Eg. 
    If SysCmd(acSysCmdGetObjectState, acForm, <FORM-NAME>) = OBJSTATE_OPEN
Then 
        MsgBox "Form is open" 
    End If 


Regards, 
Eric Starkenburg 


-----Oorspronkelijk bericht----- 
Van: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] Namens Erwin Craps - IT Helps 
Verzonden: maandag 20 juni 2005 19:20 
Aan: Access Developers discussion and problem solving 
Onderwerp: RE: [AccessD] OT - Visual Basic 6.0 - Is Form Open 

I recal it is much easier than in access. 

If formname.load  = true then 


Erwin 

        


-----Oorspronkelijk bericht----- 
Van: accessd-bounces at databaseadvisors.com 
[mailto:accessd-bounces at databaseadvisors.com] Namens Paul Hartland 
(ISHARP) 
Verzonden: vrijdag 17 juni 2005 15:09 
Aan: 'Access Developers discussion and problem solving' 
Onderwerp: RE: [AccessD] OT - Visual Basic 6.0 - Is Form Open 

Thanks, works a treat..... 

Hope I can help out sometime 

-----Original Message----- 
From: accessd-bounces at databaseadvisors.com 
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Griffiths,
Richard 
Sent: 17 June 2005 13:56 
To: Access Developers discussion and problem solving 
Subject: RE: [AccessD] OT - Visual Basic 6.0 - Is Form Open 

Maybe this 


Private Sub Form_Load() 

If IsLoaded("Form1") = True Then 
MsgBox "Yep, loaded" 
End If 

End Sub 

Private Function IsLoaded(ByVal FormName As String) As Boolean 

Dim f As Form 

'check all open forms 
For Each f In Forms 

If f.Name = FormName Then 

'yep, form is loaded 
IsLoaded = True 

'no need to loop again... 
Exit For 

End If 

Next ' f 

End Function 

Richard 

-----Original Message----- 
From: accessd-bounces at databaseadvisors.com 
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
paul.hartland at fsmail.net 
Sent: 17 June 2005 12:43 
To: accessd 
Subject: [AccessD] OT - Visual Basic 6.0 - Is Form Open 


To all, 

Does anyone know how to find out if a form is open in a Visual Basic 6.0
application ? 

Thanks in advance for any help on this. 

Paul Hartland 
Database Developer 

-- 

Whatever you Wanadoo: 
http://www.wanadoo.co.uk/time/ 

This email has been checked for most known viruses - find out more at: 
http://www.wanadoo.co.uk/help/id/7098.htm 
-- 
AccessD mailing list 
AccessD at databaseadvisors.com 
http://databaseadvisors.com/mailman/listinfo/accessd 
Website: http://www.databaseadvisors.com 

-- 
AccessD mailing list 
AccessD at databaseadvisors.com 
http://databaseadvisors.com/mailman/listinfo/accessd 
Website: http://www.databaseadvisors.com 

-- 
AccessD mailing list 
AccessD at databaseadvisors.com 
http://databaseadvisors.com/mailman/listinfo/accessd 
Website: http://www.databaseadvisors.com 
-- 
AccessD mailing list 
AccessD at databaseadvisors.com 
http://databaseadvisors.com/mailman/listinfo/accessd 
Website: http://www.databaseadvisors.com 



  _____  

avast! Antivirus <http://www.avast.com> : Uitgaande bericht is niet besmet. 


Virus Gegevensbestand (VPS): 0525-1, 21-06-2005
Getest op: 21-6-2005 20:59:51
avast! auteursrecht (c) 1988-2005 ALWIL Software.






More information about the AccessD mailing list