forms

i am trying to the subform on an existing form. i have created the new sub form and added this to the original form, however when i go to compile, i get an unknown variable error saying “setformsize” define the variable etc etc one thing i can not go is get into the c/al globals etc as this section of the tool bar menu is all greyed out. what is the set form size and how do i go about setting it? thanks

Hi My understanding is that a subform is the same as a main form from a design perspective - the difference is the way it is viewed - on the main form you create a subform control and in the properties for the subform control you enter the name of the form you want to display as a subform (SubformID property I think). You need to enter the expression in the SubFormLInk that links the two tables. The actual sizing of form within form is tricky but if you design the subform first and note the height and width settings then in the property sheet of the subform control you can set these the same so the form is viewed how you design it. You may get a much better answer in the developer forum!

Hi Just follow what Steven said. If it helps look at the properties of Form 42 “Sales Header” and Form 46 “Sales Order Subform” eg Subform Links, Sizing and borders etc…

i think thats what i have done! basically on the main form there is currently a sub form, and it is the sub form im wanting to change. i have created the subform the same as the current sub form (except the different table etc!) and when i try i link the two and compile thats when i get this error. i have just had another go, and removed the sub form (i was just changing the information before); i then created a subform control and added the links, but now i get a different error saying i have defined a unknown variable “original sub form name”! i shall try in the developers forum and see if they can throw anylight. thanks

Hi You maybe better off creating a form from scratch and then trying to link it rahter than copying an existing one as this will have all the inherent code that comes with it and maybe conflicting with your main form.