I must repeat this code for customers1, customers2, customers3 and customers4. the names of the fields also vary TxtNomCli1, TxtNomCli2, TxtNomCli3 and TxtNomCli4.
LOCATE FOR id=1
IF FOUND()
thisform.TxtNomCli1.text="customers1.nombre"
thisform.TxtIdent1.text="customers1.identidfica"
thisform.TxtDirec1.text=""customers1.direccion""
thisform.TxtTele1.text="customers1.nombre"
ENDIF
I am trying to create a variable through a loop to avoid repeating the code four times. this works in other programming languages.
For x=1 TO 4
LOCATE FOR id=x
IF FOUND()
thisform.TxtNomCli+x.Value="customers+"x".nombre"
thisform.TxtIdent+x.Value="customers+"x".identidfica"
thisform.TxtDirec+x.Value=""customers+"x".direccion""
thisform.TxtTele+x.Value="customers+"x".nombre"
ENDIF
ENDFOR
but i get syntax error
LOCATE FOR id=1
IF FOUND()
thisform.TxtNomCli1.text="customers1.nombre"
thisform.TxtIdent1.text="customers1.identidfica"
thisform.TxtDirec1.text=""customers1.direccion""
thisform.TxtTele1.text="customers1.nombre"
ENDIF
I am trying to create a variable through a loop to avoid repeating the code four times. this works in other programming languages.
For x=1 TO 4
LOCATE FOR id=x
IF FOUND()
thisform.TxtNomCli+x.Value="customers+"x".nombre"
thisform.TxtIdent+x.Value="customers+"x".identidfica"
thisform.TxtDirec+x.Value=""customers+"x".direccion""
thisform.TxtTele+x.Value="customers+"x".nombre"
ENDIF
ENDFOR
but i get syntax error