Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referencing free table
Message
 
To
15/10/1998 16:10:29
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00147220
Message ID:
00147319
Views:
26
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform