Robert,
I don't you can nest hierarchical levels in an ADD OBJECT command. Try breaking out the form class to its own definition and add the label to it:
PUBLIC oformset1
oformset1=NEWOBJECT("formset1")
oformset1.Show
DEFINE CLASS formset1 AS formset
DataSession = 1
AutoRelease = .T.
Name = "Formset1"
ADD OBJECT form1 AS form1
ENDDEFINE
DEFINE CLASS form1 as form
Top = 14
Left = 15
DoCreate = .T.
Caption = "Form1"
Name = "FORM1"
ADD OBJECT label1 AS label WITH ;
Caption = "Label1", ;
Height = 17, ;
Left = 120, ;
Top = 108, ;
Width = 40, ;
Name = "Label1"
ENDDEFINE
>I have a syntax problem with this line...
>ADD OBJECT formset1.form1.label1 AS label WITH;
>any ideas?
>here is my code...
>
>PUBLIC oformset1
>
>oformset1=NEWOBJECT("formset1")
>oformset1.Show
>
>DEFINE CLASS formset1 AS formset
>
>
> DataSession = 1
> AutoRelease = .T.
> Name = "Formset1"
>
>
> ADD OBJECT form1 AS form WITH ;
> Top = 14, ;
> Left = 15, ;
> DoCreate = .T., ;
> Caption = "Form1", ;
> Name = "FORM1"
>
>
> ADD OBJECT formset1.form1.label1 AS label WITH ;
> Caption = "Label1", ;
> Height = 17, ;
> Left = 120, ;
> Top = 108, ;
> Width = 40, ;
> Name = "Label1"
>
>
>ENDDEFINE
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao