Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filtered Grid
Message
 
 
To
25/06/2001 14:42:43
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00523145
Message ID:
00523153
Views:
9
>On my form I need a grid based on a filtered table. The filter is records of current table that have a matching record of a particular field of another table. I need to use a grid because I want the table to be updatable. Thanks for any help.

Create a parameterized view of the current table
create sql view lv_Myview as select ... from CurrentTable where somefield = ?cSomeValue order by somefield
When a record from the another table is selected:
if not used('lv_MyView')
use lv_MyView in 0 nodata
endif
local cSomeValue
cSomeValue = upper(alltrim(AnotherTable.FieldX))
*!* assumes you have an index on upper(SomeField) for optimization
requery('lv_MyView')
ThisForm.GridName.Refresh()
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform