Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to retreive data based on two fields.
Message
From
03/03/2004 11:22:29
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00882388
Message ID:
00882749
Views:
15
Thanks "set filter" looks like what I need. I have a few questions which I did not see covered in the help files. The application uses private data session. It is an old application and uses a few global vairiables. Following that convention I can setup a global variable for the site code when the user logins in.

1. Can I set the filter in the start up program or do I have to do it in each form.
2. If in each form what is the best place to set the filter and does it need to be reset at the end of the form (if so where)
3. Can I set the filter in the filter property of the data session for the table, if so would the format be
sitecode = value
Is the filter than set only for that form?
4. There are a few cases where I need all the data. What is the best way to turn the filter off and then back on (i.e. which methods)?

>If you are displaying the native data, in, say, a grid, and don't want a browse window or cursor, you could issue, e.g.:
>
>Set Filter to SiteCode = lcSelSiteCode
>Locate
>Thisform.grdInvGrid.Refresh()
>
>>I have an application that was single site and had unique inventory numbers as the primary key. The application has to become multi site and the primary key will be ALLTRIM(inventory number) + sitecode (site code is 1 character). For many forms I will need to be able to retieve inventory records ONLY for that site. What is the best way to do this?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform