Ahsan Amin

I am trying to display the form using formname.show() but it gives error "formname is not an object"

Re: Form's Show Method

Naomi Nosonovsky

Is your form in a SCX or in a VCX (form class)

If in SCX, then you should use

do form frmMyForm syntax. Check DO FORM in help.

If your form is in VCX (class), then you should use

Code Snippet

loForm = newobject('myFormClass', 'myLib.vcx')

if vartype(m.loForm) = 'O' && Successfully created form's object



Re: Form's Show Method


show() may have 2 values: show(1) for modal, show(2) for modeless and ussualy you may have Visible property .T.

Re: Form's Show Method


You use:


method first you should create the formname object. If you're creating it like:

formname = createobject( ... )

and getting that error than likely it's returning .F. in init event and the formname object is not created.