>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 tablecreate 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