Visual Basic Concepts
You can create a Command hierarchy by grouping a Command object. When a Command object is grouped, the grouped fields are added to a grouping Command object that becomes the parent of the original Command object. In the resulting recordsets, the grouping Command object contains a row for each unique set of values of the grouped fields.
For example, if the Command object that you want to group is called Customers, you can specify to group by its "Country" Field object and name the grouping Command object "ByCountry." The resulting group hierarchy consists of a Command object named ByCountry that contains two fields: Country and Customers. This is illustrated by the following figures.
Original Customers Table
Customers Table Grouped ByCountry
A grouped-based hierarchy displays in the Data Environment outline view as a single Command object with two folders of fields, one for the grouping Command and the other for the original, or detail, Command object.
Note The name of all grouping Command objects must be unique among all other Command objects within the current Data Environment. For example, if you are creating a group based on a Field object named country, a logical group name may be "ByCountry."
To group a Command object
Note The default name is CommandName_Grouping where CommandName is the name of the selected Command object.
-or–
Alternatively, to deselect fields, select the field to remove and click <, or click << to deselect all fields simultaneously.
Note If no fields are available, the arrow buttons are disabled. In addition, if you use the Properties dialog box of a child Command object to establish a group, the fields that define the parent-child relationship must be included as fields for the group. The Data Environment designer prohibits these fields from being removed.