[AccessD] still troubles with IsLoaded

Heenan, Lambert Lambert.Heenan at AIG.com
Fri Dec 17 13:44:04 CST 2004


IsLoaded is built in from at least Access 2002. It syntax is

Dim boolResult as Boolean

boolResult = expression.IsLoaded

where "expression" is any Access object.

The IsLoaded() function from Access 97 Northwind is simply a hand rolled VBA
function (not a part of Utility.mda) and it works only with forms, though
could be modified for other objects. 

I find that the old IsLoaded function coexists happily with the built-in
IsLoaded Property in Access 2002.

Lambert


> -----Original Message-----
> From:	accessd-bounces at databaseadvisors.com
> [SMTP:accessd-bounces at databaseadvisors.com] On Behalf Of Nicholson, Karen
> Sent:	Friday, December 17, 2004 1:50 PM
> To:	Access Developers discussion and problem solving
> Subject:	RE: [AccessD] still troubles with IsLoaded
> 
> I hear that there is an isloaded function that is new to Access 2003.
> The syntax would be:
> If CurrentProject.AllForms("frmVestigingenForm").IsLoaded 
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of MartyConnelly
> Sent: Friday, December 17, 2004 1:39 PM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] still troubles with IsLoaded
> 
> 
> Here is the IsLoaded function that used to be in utility.mda that was an
> 
> automatic addin for Access 97
> This is a copy of routine  from northwind.mbd
> 
> Function IsLoaded(ByVal strFormName As String) As Boolean
>  ' Returns True if the specified form is open in Form view or Datasheet 
> view.
>    
>     Const conObjStateClosed = 0
>     Const conDesignView = 0
>    
>     If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> 
> conObjStateClosed Then
>         If Forms(strFormName).CurrentView <> conDesignView Then
>             IsLoaded = True
>         End If
>     End If
>    
> End Function
> 
> 
> pedro at plex.nl wrote:
> 
> >Hello Group,
> >
> >i keeping getting an error on the IsLoaded. "Sub or function not
> defined"
> >This was working in A97, but in 2003 it is giving me troubles.
> >
> >i tried to Dim al objects, with no result.
> >
> >I can't figure out why
> >
> >Please help
> >
> >Pedro Janssen
> >
> >
> >
> >Private Sub pl_Form_Current()
> >On Error GoTo Err_Form_Current
> >
> >    Dim strDocNaam As String
> >    Dim Koppelcriterium As String
> >        
> >        strDocNaam = "Produktenlijst"
> >        Koppelcriterium = "[Levcode] = Forms![Lev]![Levcode]"
> >   
> >    If IsNull(Me![LEVNAAM]) Then
> >        Exit Sub
> >    ElseIf IsLoaded("Produktenlijst") Then
> >        DoCmd.OpenForm strDocNaam, , , Koppelcriterium
> >    End If
> >
> >Exit_Form_Current:
> >    Exit Sub
> >    
> >Err_Form_Current:
> >    MsgBox Err.Description
> >    Resume Exit_Form_Current
> >
> >End Sub
> >  
> >
> 
> -- 
> Marty Connelly
> Victoria, B.C.
> Canada
> 
> 
> 
> -- 
> 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



More information about the AccessD mailing list