The Master-Detail sample

The example discussed in this chapter is designed for the input of order information (headers and order lines), illustrating a typical master-detail relationship. The form used by the example contains fields from both the orders and items tables in the custdemo database.

Since there are multiple items associated with a single order, the rows from the items table are stored in a program array and displayed in a table container on the form. Most of the functionality to query/add/update/delete has been covered in previous chapters; this chapter will focus on the master/detail form and the unique features of the corresponding program.This type of relationship can also be handled with multiple dialogs, as shown in Chapter 13.

Figure: Master-Detail Form

This figure is a screenshot of the orderform form, a master-detail form that displays information from multiple tables in the custdemo database.