Click to See Complete Forum and Search --> : checking for loaded form


batsheva
May 14th, 2001, 02:15 PM
Is there a way to check if a specific form has been loaded without loading it?

Johnny101
May 14th, 2001, 03:46 PM
Go through the Forms collection and check the Name property. if it's the one you're looking for, you have, if you get through the whole loop and nothing, - then it's not loaded.

dim frm as Form
dim bloaded a boolean

for each frm in Forms
if frm.Name = "Form1" then
bloaded = true
exit for
end if
next

if bloaded then
msgbox "Form is loaded."
else
msgbox "form is NOT loaded."
end if




would that work for you?

john

John Pirkey
MCSD
http://www.ShallowWaterSystems.com
http://www.stlvbug.org