On a form level you have datasource, one or more. You build a query specifying relations between them. Executequery executes this query to get data from underlying tables and show it on a form. executeQuery method is executed when a form is opened for data display. The executeQuery method can be overridden on a form data source by right-clicking the Methods node under the data source, pointing to Override Method, and then clicking executeQuery. Examples: The following example executes a data source query. public void executeQuery() { this .query().dataSourceNo( 1 ).clearRanges(); if (CityCode.valueStr() != "" ) { QueryBuildRange qbrCityCode; qbrCityCode = this .query().dataSourceNo( 1 ).addRange( fieldNum (SMJ_CandidateDetails,CityCode)); ...