In this step you will create a simple form to fetch a record from the Department table.
In the later steps, you will add insert, update and delete operations to this form to build a complete maintenance application.
1. Create a New / Form / Basic Form
Named : iiiMaintDept
Description: Maintain Departments
2. Using the Layout ribbon add a Layout Manager with 2 rows and 2 columns. Adjust the dividers so that your form looks like the following:
3. Using the Repository tab, locate the xDepartments table. Notice that the table has two columns, xDepartmentCode and xDepartmentDescription. The table is keyed on xDepartmentCode.
4. Drag and drop the xDepartmentCode and xDepartmentDescription fields on to row 1, column 1.
5. Using the Layout ribbon, give both fields an Alignment of Top Left and a Flow of Down.
6. Give both fields a margin Top of 10 and a margin Left of 20.
7. Adjust the width of each field. Your form should look like the following:
8. Add a Status Bar to the second row, column 1 so that validation error messages can be displayed.
The Status Bar should already have an AutoLocate property to True. The Status Bar will then occupy the width of the form and attach to the lower edge.
9. Add a Push Button to the first row, column 2.
a. Set the button Name and Caption to Fetch.
b. Create a Click event routine for the Fetch button.
10. Give the push button an Alignment of Bottom Center and a Flow of Up.
Change its margin Bottom to 10.
Your form should appear like this:
11. Save the form.