>I need to design order history enquiry form. In the form, it need to inquiry three tables information (Order, Order-item, Delivery-Detail). Each order can have many order-item, and each order-item can also have many delivery detail. I just want to how to create this enquiry form. In this form, it with contain two grids. One is to display the order-item, and the other one is display the delivery-detail. Orderno is the key to seek the order-item, and the orderno, item-no and item-color are the key to seek the delivery-item records.
>I also want to know how to set the childorder, linkmaster, relationexpr in this two grids (grid-orderitem, grid-deliveryitem).
>Waiting for any suggestion.
>
>Thanks
>
>Dennis
There are different ways to do this. The easiest that I have found is to do something like...
In data environment
1) Set the INITIALSELECTEDALIAS to the parent table (ORDER.DBF)
2) Set relationships by
a) dragging the ORDER.keyfield to the ORDERITEM.key_id_to_order_master,
b) dragging the ORDERITEM.keyfield to the DELIVERY.key_id_to_item
c) DO NOT set any other properties dealing with indexes (except the ORDER.DBF)
In the form
3) Create your ITEM grid and set the control source to the item table
4) Do the same for DELIVERY
When run, it should show properly
HTH
//:^)