Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Referencing free table
Message
 
À
15/10/1998 16:10:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00147220
Message ID:
00147319
Vues:
28
>I have a form with a dataenvironment of two free tables. Cursor1 is active almost all the time, Cursor2 is called on occasion to provide the value for a textbox. I am unclear as to the proper syntax for referencing a field in a record of cursor2. I've tried Thisform.Mytextbox.value = Thisform.dataenvironment.cursor2.MyTable.MyField but I get a blank textbox. I have reasons for not putting the free tables in a database. Am I asking the impossible?

Peter,
Even though a table is a free table you can still use its alias when referring to it. The alias defaults to the table name. So if your two tables are "Customer" and "ZipCodes" you would refer to any field as "Customer.LastName" or "ZipCode.State" There is no need to refer to the internal cursor1, cursor2 values.

You can re-set the alias at design time, also by clicking on any table in the DE and looking at the Data sheet in the properties form.

You 'attach' the data to a textbox by setting the controlsource of the textbox to the field, using the alias. There's a picklist there to use.

I hope this wasn't too elementary - if so, please ignore it.

Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform