Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you get a Form to recognize an open Data Session
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00060289
Message ID:
00060505
Views:
22
>>>Thank's for the reply, and no need to apologise, I'm not yet a pro at foxpro. I am still a beginner. I still cannot seem to get the Form to see the tables. Step by step, this is what I have done: I have opened an empty test folder, and have copies to .dbf files to that folder. I have set the default to c:\test. I have created indexes for each table on matching fileds. I go to the foxpro menu: Window, Datasession and get a dialog box. I add both tables, and set the relationship between them. I then go to the menu: File, New, Form. Then from the form control tool bar I place a field-text box onto the form. I then open the properties window for this field-text box, and go to the Data tab. I then go to Control-source, and then click on the Fx button on the left which pulls up an Expression builder box. PROBLEM: there are no fields to choose from - the fields box within this Expression builder dialog is totally blank/empty.!!! This is my problem. (In foxpro 2.6 under the same
>>circumstances you could select any fields from both of these tables, from a similar expression dialog box) What do I have to do, step by step, to get this Controlsource - Expression builder to see field data form these to tables?
>
>Adding tables to the Data tab ( if I understood you corretly ) of the project does not add the tables to your form. You must implicitly add them to the data environment of the form. My understanding of the data tab, is that is really more for your information. You can see a diagram of sorts of what your relations are supposed to look like. You can also set your RI here.
>
>HTH

To expand on what Dan has written, open your form in the form designer, and right-click anywhere on the form (not on a control). Choose Data Environment from the menu. Right click in the DE box, and you will get a list of the available tables. Keep adding until you have ALL the tables you'll need in the form, then close the Add list.

Click on any cursor (table) and look at the property sheet. In the data tab (NOT the data tab of the Project Manager) you can set properties for index, filter, etc. for each table.

Finally, if you go to the Control source for any control you will now have a list of fields available to link in.

Make a sample form and try dragging fields from the DE to your form and then looking at the properties set automatically this way. You will find many shortcuts for designing forms.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform