0

I have in VFP9 a form which on init event dynamically create textbox controls. And I have a button on this form whose function is to get the textbox values in an array. I tried so:

`   FOR i=1 TO thisform.Objects.count 
    IF UPPER(thisform.Objects(i).Name) == "TEXTBOX"
    k=k+1
    r(k) = thisform.Objects(i).name.value && here is the problem
    ENDIF 
    ENDFOR `

but I don't know how to make reference to textbox properties. Thanks in advance.

Tony Hopkinson
  • 20,172
  • 3
  • 31
  • 39

1 Answers1

2

I reckon you probably want something more like

FOR i=1 TO thisform.Objects.count 
    IF UPPER(thisform.Objects[i].BaseClass) == "TEXTBOX"
        k=k+1
        r(k) = thisform.Objects(i).name
    ENDIF 
ENDFOR
Swordblaster
  • 356
  • 2
  • 7