initialize form object

S

smk23

If I have a variable that is a form object, how do I initialize that? Or
rather, how do I detect if the variable has been set or not?
 
A

Alex Dybenko

to initialize such variable you can either set if to opened form:
set frm=forms("MyForm")
or create a new instance:
set frm= new form_MyForm

to detect if it set - you can use Is Nothing:

if frm is nothing then
'not set
end if
 
Top