Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Array passed to form no longer an array
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00361069
Message ID:
00361123
Views:
20
>Are you sure you wanted to send this to me?
>Did you test my code?
>
>>Your example only passed a variable with the value set to the value of the first element in the array; it did not pass the array.

Yes, it was to you. And to be fair, I didn't test it because I saw some things I thought to be wrong and just posted. After your response, I did test it.

You are still referencing the form property in the DO FORM call which will not work so I thought that was a typo. I changed it to be the laSearchFields array you created locally. However, just assigning laSearchFields to an array property doesn't work. All that is doing is assigning all elements of the local array to the value of the first element. Because the call uses a procedure syntax and not a function syntax, the default is to pass variables by reference so laSearchFields does get passed as an array. However, it has the wrong values in it.

Yours:
dimension laSearchFields[n,m]
laSearchFields = thisform.aSearchFields
DO FORM FIND WITH "device", thisform.aSearchFields TO lnid

Typo Corrected:
dimension laSearchFields[n,m]
laSearchFields = thisform.aSearchFields
DO FORM FIND WITH "device", laSearchFields TO lnid
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform