{Header}
This example shows an implementation of a pop-up list for selecting values and a smart lookup for quick data entry. The example is based on two tables: departments and employees where users assign a manager to each department. Although a simpler solution may be to let users select a manager using a List Box, this becomes impractical when a large number of records is involved. For example we may not want users to scroll through 100 managers in a listbox. Instead, the pop-up list can filter the records displayed by using a keyword search as a faster way to find the appropriate manager. The lookup further enhances the process by allowing the user to specify partial information when searching for a manager i.e. the managers initials, first or last name or a partial name.
Database: Intranet
Tables: employees, departments
The Record form's Before Show event is used to lookup a manager's name based on the manager id.
The Record form' On Validate event is used to find a manager based on search criteria or display an error message if no record or more than one record is found.
The Grid form's Before Show event is used to hide the Navigator control is there are less than two pages of records to navigate.
The Grid form's Before Build Select event is used to modify the Where clause of the executed SQL statement to include any specified search criteria.