Hi, Try this code:
public void lookup() { SysTableLookup sysTableLookup = SysTableLookup::newParameters(TableNum,this); Query query = new Query() ; QueryBuildDataSource qbds; Table1 objTable1; ; sysTableLookup.addLookupfield(fieldnum(Table1, Field1)); sysTableLookup.addLookupfield(fieldnum(Table1, Field2)); qbds = query.addDataSource(tablenum(Table1)); qbds.addRange(fieldnum(Table1, Field1)); qbds.addRange(fieldnum(Table1, Field2)).value(QueryValue(1)); sysTableLookup.parmQuery(query); sysTableLookup.performFormLookup(); } Hope this helps. Regards, Anitha On Tue, Aug 4, 2009 at 2:39 AM, Girac <girac...@yahoo.com> wrote: > > > Hello all, > Can someone help me with building a lookup filter on a form? I want to > add a new filter to some forms. I have copied the code from existing > filter to new one. when i compile I get errors variable not declared, > table does not contain this field, etc... > > I have declared my variable and the error I receive is is "table does > not contain this field." > > Where do I put this table info in my code? > > If someone can document steps are involved that will be great. > > >