I have created a formset called FormSet1 which contains just one form
at the moment with a Pageframe on it. I have named the form 'frmMain'.
However I cannot reference any objects on the form from my toolbar
because it says 'unknown reference frmMain'. The following message was
displayed when I had an error on one of the pages - "...... in Program
Formset1._13V1BUQUS.Pageframe1.pgClient" which shows that the name of
my form has been changed to a generated one upon compilation as this
differs each time I recompile.

How do I make it use my name, frmMain?

Thanks
Kate

Re: VFP8 Form name changes upon compliation by Gene

Gene
Mon Dec 01 08:15:54 CST 2003

It has been well accepted practice in the VFP community to NOT use
formsets. They have a lot of quirks to try and work around, it is a much
better practice to use modeless forms IMO.


To make your toolbar button more abstract try and use the forms
collection instead that way you won't have to worry about the form name.
Just check to make sure the form has the method/property/control you
want to invoke.

I split these lines up to avoide word wrap :)

IF TYPE('_screen.ActiveForm') ="O"
IF PEMSTATUS(_screen.ActiveForm, "SomeformObject", 5)
? _screen.ActiveForm.SomeformObject.name
? _screen.ActiveForm.ActiveControl
ENDIF
ENDIF


HTH....

Kate wrote:
> I have created a formset called FormSet1 which contains just one form
> at the moment with a Pageframe on it. I have named the form 'frmMain'.
> However I cannot reference any objects on the form from my toolbar
> because it says 'unknown reference frmMain'. The following message was
> displayed when I had an error on one of the pages - "...... in Program
> Formset1._13V1BUQUS.Pageframe1.pgClient" which shows that the name of
> my form has been changed to a generated one upon compilation as this
> differs each time I recompile.
>
> How do I make it use my name, frmMain?
>
> Thanks
> Kate

Re: VFP8 Form name changes upon compliation by Josh

Josh
Mon Dec 01 08:26:10 CST 2003

Just checking the simple stuff 1st....
did you change the name or caption?

On 1 Dec 2003 04:42:59 -0800, kate@microsec.co.uk (Kate) wrote:

>I have created a formset called FormSet1 which contains just one form
>at the moment with a Pageframe on it. I have named the form 'frmMain'.
>However I cannot reference any objects on the form from my toolbar
>because it says 'unknown reference frmMain'. The following message was
>displayed when I had an error on one of the pages - "...... in Program
>Formset1._13V1BUQUS.Pageframe1.pgClient" which shows that the name of
>my form has been changed to a generated one upon compilation as this
>differs each time I recompile.
>
>How do I make it use my name, frmMain?
>
>Thanks
>Kate


Re: VFP8 Form name changes upon compliation by kate

kate
Wed Dec 03 06:21:36 CST 2003

Thanks, Gene, that has provided a work-around for my problem. I've not
had any problems working with formsets before version 8 and I like the
readability of directly naming the object so I would still like to
find the reason for this.



Gene V <g_V_i_t_a_lat@sorry.com> wrote in message news:<eOdKjWBuDHA.556@TK2MSFTNGP11.phx.gbl>...
> It has been well accepted practice in the VFP community to NOT use
> formsets. They have a lot of quirks to try and work around, it is a much
> better practice to use modeless forms IMO.
>
>
> To make your toolbar button more abstract try and use the forms
> collection instead that way you won't have to worry about the form name.
> Just check to make sure the form has the method/property/control you
> want to invoke.
>
> I split these lines up to avoide word wrap :)
>
> IF TYPE('_screen.ActiveForm') ="O"
> IF PEMSTATUS(_screen.ActiveForm, "SomeformObject", 5)
> ? _screen.ActiveForm.SomeformObject.name
> ? _screen.ActiveForm.ActiveControl
> ENDIF
> ENDIF
>
>
> HTH....
>
> Kate wrote:
> > I have created a formset called FormSet1 which contains just one form
> > at the moment with a Pageframe on it. I have named the form 'frmMain'.
> > However I cannot reference any objects on the form from my toolbar
> > because it says 'unknown reference frmMain'. The following message was
> > displayed when I had an error on one of the pages - "...... in Program
> > Formset1._13V1BUQUS.Pageframe1.pgClient" which shows that the name of
> > my form has been changed to a generated one upon compilation as this
> > differs each time I recompile.
> >
> > How do I make it use my name, frmMain?
> >
> > Thanks
> > Kate

Re: VFP8 Form name changes upon compliation by kate

kate
Tue Dec 09 09:10:16 CST 2003

Thanks for your offer to look at this, however in trying to create a
cut down version to send to you I discovered the problem. It occurred
when I'd loaded the menu from the form's Init method as I'd copied an
old form and had DO xxx.mpr with this, .T. but it should be DO xxx.mpr
with this, formName


Josh Assing <josh@jassing.com> wrote in message news:<3fjmsvkokdcu41j8kjcmktdubg05kllo79@4ax.com>...
> Just checking the simple stuff 1st....
> did you change the name or caption?
>
> On 1 Dec 2003 04:42:59 -0800, kate@microsec.co.uk (Kate) wrote:
>
> >I have created a formset called FormSet1 which contains just one form
> >at the moment with a Pageframe on it. I have named the form 'frmMain'.
> >However I cannot reference any objects on the form from my toolbar
> >because it says 'unknown reference frmMain'. The following message was
> >displayed when I had an error on one of the pages - "...... in Program
> >Formset1._13V1BUQUS.Pageframe1.pgClient" which shows that the name of
> >my form has been changed to a generated one upon compilation as this
> >differs each time I recompile.
> >
> >How do I make it use my name, frmMain?
> >
> >Thanks
> >Kate