Показать сообщение отдельно
Старый 06.01.2009, 17:19   #2  
AndrianG is offline
AndrianG
Участник
 
43 / 19 (1) ++
Регистрация: 12.12.2008
Можно и так но мно кода нужно написать !

Query query = new Query();
QueryBuildDataSource queryBuildDataSource;
QueryBuildRange queryBuildRange;

// Create an instance of SysTableLookup where 'this'
// is the current form control.
SysTableLookup sysTableLookup =
SysTableLookup::newParameters(tableNum(custTable), this);
;

// Add fields to be shown in the lookup form.
sysTableLookup.addLookupField(fieldNum(CustTable, AccountNum));
sysTableLookup.addLookupField(fieldNum(CustTable, Name));

// Limit and arrange the data selection.
queryBuildDataSource = query.addDataSource(tableNum(CustTable));
queryBuildRange = queryBuildDataSource.addRange(
fieldNum(CustTable, AccountNum));
queryBuildRange.value('0..Z');
sysTableLookup.parmQuery(query);

// Perform the lookup.
sysTableLookup.performFormLookup();

//Don't call super() (commented out in the code).
// super()