Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
You can display records from a one-to-many relationship in a list so that the list displays the child records in the relationship as the record pointer moves through the parent table.
To display child records in a list
Add a list to the form.
Set the ColumnCount property of the list to the number of columns you want to display.
For example, if you want to display the
Order_id
,Order_net
, andShipped_on
fields in the list, set the ColumnCount property to 3.Set the ColumnWidths property to the appropriate widths for displaying your selected fields.
Set the RowSourceType of the list to 3 — SQL Statement.
Set the RowSource to the SELECT statement. For example, the following statement selects three fields from the orders table for the current record in the customer table:
SELECT order_id, order_net, shipped_on from orders ; WHERE order.cust_id = customer.cust_id ; INTO CURSOR temp
In the Init event of the form and in the code that moves the record pointer through the table, requery the list:
THISFORM.lstChild.Requery
See Also
Refreshing a One-to-Many Display Based on a List Value | Adding Pictures to Items in a List | Using Check Boxes | Using Controls | Controls and Objects