On Wed, 13 Aug 2014 10:24:53 +0200, Duncan wrote: > I have created a three page form with a datalink for displaying / > updating the rowset information. I am trying to create a subform > containing the rowset's memo field (for making notes) that can be > invoked through a popup menu on any of the three pages. I used the form > designer to create the subform and followed the manual's instructions to > change:- > > class TestFormForm of FORM > > to > > class TestFormform( Testpopup, "Mypopup") of SUBFORM( Testpopup, > "Mypopup") > > i.e. Testpopup is the 3 page parent form > > but i continually get syntax errors on the above statement which I have > amended to exclude the parent name without any success. > I would welcome any advice to work around the problem. I found subforms a PITA as the form designer can't handle them. To get round this I wrote a little program to convert forms to sub forms. This way I keep the form available for tweaking in the designer and the subform available for use. If I change the form all I need to do is recreate the subform again. I name all forms to be converted to subforms as subxxxxx.wfm and the converted files are saved as subxxxxx.sfm. Coordinates for .wfm are relative to the screen coordinates but subform coordinates are relative to the parent form's coordinates. Remember to move the .wfm form that is to be converted to a .sfm form to the top left corner of the designer before saving it. The parent object and title for the subform are passed as arguments when the subform is instantiated so these values should not be hard coded in the subform source code. class TestFormform( oParent, cTitle) of SUBFORM( oParent, cTitle) In practice I've found that the value in cTitle does NOT get passed to the subform so one needs to set the subform text property manually once the subform has been instantiated. Mervyn. ********* Start of sub1.sfm ******** class sub1Form( oParent, cTitle ) of SUBFORM( oParent, cTitle ) with (this) height = 16.0 left = 21.5714 top = 1.1364 width = 40.0 text = "" endwith this.PUSHBUTTON1 = new PUSHBUTTON(this) with (this.PUSHBUTTON1) onClick = class::PUSHBUTTON1_ONCLICK height = 1.0909 left = 8.2857 top = 8.7273 width = 15.2857 text = "Pushbutton1" endwith function PUSHBUTTON1_onClick this.parent.close() return endclass ********* End of sub1.sfm ********* ****** Start of subformtest.wfm ******* ** END HEADER