Click to See Complete Forum and Search --> : Determine if a form is loaded?


wilton
January 10th, 2000, 08:51 PM
How do I determine if a form is loaded? I tried to use

if form.visible = true then
'code here
end if




but that caused the form's load sub routine to be executed and I can't have that. Someone out there have a good idea?

jaredy
January 10th, 2000, 09:10 PM
You have to iterate thru the forms collection:

public Function FormLoded(sFormName as string) as Boolean
Dim frm as form
for each frm in forms
if frm.name = sFormName then
FormLoaded=true
exit function
end if
next 'frm
end function



If the name is not found then FormLoaded=False
Jared Youtsey

wilton
January 10th, 2000, 09:24 PM
Worked great,thank you.