Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Array Element for textbox controlsource
Message
 
 
À
23/05/2005 08:35:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01016689
Message ID:
01016747
Vues:
8
Winfred,

The error message means that the item listed in the ControlSource can not be found at the time the textbox is instantiating so VFP unbinds the control.

I'm with Sergey on this. Why do you need to select all of the lot numbers into an array and then bind the textbox to the last array element?

Fabio's suggestion has problems because of the public array which prevents the form from running more than once.

If you have to have the array, create a form level property aLot[1]. Set the ControlSource = thisform.aLot[1] on the property sheet. When you run the select into the array reset it:
THISFORM.TXT_CURRENT_LOT_NUMBER_VALUE.ControlSource = "thisform.alot[1,RECNO()]"
>I am trying to assign an arrary element to a textbox controlsource.
>
>Everytime I run the from I get this error:
>
>"Variable is not found. Unbinding object txt_current_lot_number_value."
>
>List below are the things I have already tried.
>
>A. Have assigned the array has a contorlsource on the
> textbox object: galot(1,RECNO())
>
>B. Used the select statement to create an array.
>
>DIMENSION galot(1,RECNO())
>IF NOT USED('STOCK')
> USE STOCK IN 0 SHARED
> SELECT STOCK
> DIMENSION galot(1,RECNO())
> SELECT LOT FROM STOCK INTO ARRAY gaLOT
> THISFORM.TXT_CURRENT_LOT_NUMBER_VALUE.ControlSource = galot(1,RECNO())
> ENDIF
>
>How can I bound an array to an textbox object without getting this error message.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform