Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to retreive data based on two fields.
Message
From
04/03/2004 09:58:57
 
 
To
03/03/2004 11:22:29
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00882388
Message ID:
00883080
Views:
19
Claude

1. Setting the filter only applies when you've got the table open. If you open the table at start up, and you want it to be filtered from there, then you can filter at start up. However, the table's session won't be the same as in your forms, private, which will need their own filter setting. Besides, you said that not all forms want to be for a single site.

2. You can filter in the Init() method.

3. I assume your table is opened automatically in your Data Environment. You can set the filter property, via the "data" tab, of the table's properties in the DE.
if you're selecting a site (say via a combobox) on your form, then you can filter after this, in the valid() event of the combo. It ALL depebnds on your functionality. Yes, SiteCode = and is only for the private session of the form.

4.

lcFilter = SET("FILTER") && Store current filter setting
Set Filter to && turns filter off
Locate && c.f. Go TOP (but faster) - need move file pointer for a filter to take effect
* ... code with filter off
Set Filter to &lcFilter && restores previous filter
Locate
* ... Code with filter on

HTH

Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform