Create a function in your subform that simply returns the field you're looking for (e.g. EXIT("Line No.") will return the Sales Order line no). On your main form, call this function as follows:
Remove the variable mySubForm, click on the subform control, go to View->Properties, look at the Name property of the control (it should be SalesLines) and look in your code, you should call something like:
Comments
ReturnVal := CurrForm."Subform Name".FORM."Function Name";
Hope this helps,
Richie
var
mySubForm = FORM, Sales Order Subform
returnVal := CurrForm.mySubForm.FORM.returnLineNr;
in Sales Order Subform I have declare a function called returnLineNr
with syntax EXIT("Line No.");
The error message is
"You have specified an unknown variable" mySubForm
The variable is defined in globals.
Cant I use this syntax in Nav 3.6?
From Form 42:
SalesLineNo := CurrForm.SalesLines.FORM.getlineno;
where SalesLineNo is an integer variable and getlineno is a function on Form 46 that returns the line no.
Remove the variable mySubForm, click on the subform control, go to View->Properties, look at the Name property of the control (it should be SalesLines) and look in your code, you should call something like:
By using the actual subform control on the form, you get data from the current record that the user has selected...
Arhontis
https://forum.mibuso.com/search
Thanks all