Finding Matching Records in Data Access Pages - Using a textbox to find matching records
(Page 2 of 4 )
Create a TestEmployees.htm DAP
The design view of the Employees table is shown in the following picture.

The DAP is created using the "Create data access page by using wizard" shortcut in the DapCntrls database which has just one table called "Employees." The fields listed below were chosen from among the various fields (Columns) present. There was no particular reason for this choice.
- EmployeeID
- LastName
- FirstName
- BirthDate
- Country
Design View of TestEmployees.htm
This created page, "TestEmployees.htm," is shown in design view together with its "FieldList" as shown in the next picture.

Now add a textbox control from the "Tools" to the "Section: HeaderEmployees" just below the Employee information as shown in the next picture. The picture also shows the textbox's ID being changed to "IdEmp." The textbox's label was changed to "Search by EmployeeID." Now when it is properly coded, when you view this page, type in a number and step out, the Employee information displayed should reflect the EmployeeID you typed into this box.

Next: The code page and the code to search the EmployeeID >>
More Database Code Articles
More By Jayaram Krishnaswamy