Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I change from single table to relational on my form
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00167394
Message ID:
00171432
Views:
29
Hi Barbara,
If I can add to that I would say that "If you absolutely MUST use Filters -> Take a cold shower and think about Views "
just my .02 worth [ hope my Australian senso of humour crosses the ocean OK ]

>Robin,
>
>It looks like the problem has to do with your relations between files.
>
>1. Are you using grids with the built in master/child relations for any of these displays? If so, then the app table must be indexed on the site ID/Name (whichever is the Primary ID). However, you can have indexes on SiteID + App Name, SiteID + AppNum, etc. Each one will work in your grid, but order the result differently.
>
>2. If you're pulling up an app and want to get the matching Site, then you need to reverse the relationship. Either set the relation from App into Site or else set NO relation (my preference) and use a Seek on the Site table to get the correct data.
>
>3. Filters: In a word, DON'T. If you need to have a filtered list, use a parameterized view if you're going to be updating data or a cursor if it's read-only data. This is true for reports as well. Reports are MUCH simpler if all the data is in a single cursor. You can set the basic SQL and then add the ad hoc filter information with a macro:
>cFilter = inlist(field1, 'a', 'b', 'c')
>
>SELECT Field1, Field2,...   FROM MYTABLE ;
>   WHERE &cFilter into cursor RptData order by Field2
>These filters can be pre-set or developed 'on the fly'.
>
>4. If you absolutely MUST use filters in a form, then you need to be careful how you write them - you don't want a variable to go out of focus.
>
>HTH
>Barbara
>
>>Thank you for responding and in advance for your help. Simplified, I have three tables Site, Application, and Employee. I have four screens. A master screen which has information from site and app, a filters screen which lets the users set filters, a reports screen which allows push button canned reports, filterd (if desired) and a second app screen which has contact information that is currently in the app record, but which will be pulled off into a related table of it's own later. I have been able to get my main screen to skip through the records and pull information from the site record. I had a refresh problem and a relationship problem in my data environment which are both fixed now. What I have yet to do is to create a method that will let me select app records, based on site name, I haven't coordinated between the second data screen and the first, and I really would like to change the sort order of the app table on the fly, and I would like to filter by selecting from a
>>dropdown list from the employee table but haven't figured that out yet.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform