how to retrieve parameters

hi… i was wondering how to get the values of function that is in a codeunit… i do this in a code unit GetId(Id:code[10]) and in a form,i want to get the values from that function is that posible???

You can pass parameters to this function with VAR checkbox checked. In this case function will return the parameter with all changes that was made during function runtime. Also you can use Return Value, but it’s only for one parameter that isn’t an array. -

thanks… i run a form (form 1), then when i push te ok button, i want to run another form (form2) but the form1 doesn’t close… what can i do?

Use CurrForm.CLOSE on the form1 before running the Form2. -

thanks…where is latvia?

HELLO ARTHUR… CAN I SHOW A FORM IN OCX? I MEAN…I DO THIS Public Sub ShForm() Form1.Show End Sub

I’m not sure about that. I haven’t tried it [|)] Why do you need it? Latvia is in Baltic States, Europe [;)] -

hello arthur i have an ocx, and it shas this function function sum1(n1 as integer,n2 as integer) as integer sum1=n1+n2 end function and i have registered the ocx and in a form i do this total=SumOcx(number1,number2); where SumOcx is the ocx variable and the result is always 0,what am i doing wrong??? best regards

This will not work as you need to call a function within the OCX variable to perform the Sum (why not just do the summing in Navision!?). It would read something like total = SumOcx.Sum(Number1, Number2)… You would then have to make sure that the “Sum” function returned a suitable type depending on what the type of “total” is. So for example “total” would be of type Integer in Navision and “Sum” would return type Integer in the VB OCX Code… Hope this helps Ade [:)]

Actually looking at your post again you need to do… total=SumOcx.sum1(number1,number2);