Hi Matt,
There was recent (about 3-5 days ago) discussion here in UT on the same topic. Try to find it.
I think, you can use this simple approach, if you call this form from prg:
In the calling prg declare array as PRIVATE (you can try with PUBLIC first, then you try with PRIVATE, there should be no difference). Then in your form do whatever you want with this array (even Redimension should work, I think). When you close your form, you'll see, that the array elements are changed. You don't need to return anything from Form.Unload method.
Let me know, if it would work for you.
>I am trying to return an array from a form but after my form unloads, the array elements' values are all set equal to the first element value. I've messed with this in both vfp5 and vfp6sp3 without getting it to work. Knowing the array must be passed by reference, I have fooled around with SET UDFPARMS TO REFERENCE in the calling program and in the form's unload event before the return statement to no avail. I have tried DO FORM myform TO @aSelectedItems and get a syntax error in vfp5 and no change in vfp6sp3. I have tried RETURN @aSelectedItems and get a syntax error. Is there something I'm missing here or should I switch to a parameter object??
>
>Thanks in advance, Matt
If it's not broken, fix it until it is.
My Blog