Not IsLoaded

A

alexanderrocks

I need to find the "Not IsLoaded" command so that i can open a report with a
form. Access help tells you it is in the Northwind Sample database, which I
think I can get, but we have a tight beaurocracy here in public education and
it would take a number of steps to find. As I remember, the command is only
a few simple steps, but I cannot recall them at the moment.

tia,
ian
 
B

Brendan Reynolds

A number of different versions of the 'IsLoaded' function have shipped with
different versions of Access. This is the version from Access 2003. There is
no 'Not IsLoaded' command. 'Not' is a keyword that negates the value of the
expression that follows. 'If Not IsLoaded("SomeForm")' is equivalent to 'If
IsLoaded(SomeForm) = False'.

Function IsLoaded(ByVal strFormName As String) As Boolean
' Returns True if the specified form is open in Form view or Datasheet
view.
Dim oAccessObject As AccessObject

Set oAccessObject = CurrentProject.AllForms(strFormName)
If oAccessObject.IsLoaded Then
If oAccessObject.CurrentView <> acCurViewDesign Then
IsLoaded = True
End If
End If

End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top