Here is the basic format for relating several tables.
Say you have four tables in roughly the following format:
Customer: (customer info)
CustId, Name, Address, CSZ, etc.
Indexed on CustId
Tx: (monetary transactions, payments etc.)
txCustId, txAmount, txType, etc.
Indexed on txCustId
Letter: (letters sent to customer, late notices, statements, etc)
ltrCustId, ltrType, ltrDate, etc.
Indexed on ltrCustId
Descript: (letter descriptions, late notice, statement, etc.)
descType, descText
Indexed on descType
To create a relation to customer transactions and letters sent, do the following:
USE customer ORDER CustId IN 0
USE tx ORDER txCustId IN 0
USE letter ORDER ltrCustId IN 0
USE Descript ORDER descType IN 0
SELECT customer
SET RELATION TO CustId INTO tx
SET RELATION TO CustId INTO letter ADDITIVE
SELECT letter
SET RELATION TO ltrType INTO Descript
SELECT Customer
This will establish a link like this:
Customer -> Tx AND
Customer -> Letter -> Descript
Now you can do your browse, processing, whatever.
SCAN
* do stuff
ENDSCAN
So, moving the record pointer in Customer will also move to the associated records in Tx and Letter, which will move the record in Descript to the correct record.
Note that including the ADDITIVE keyword is needed when setting relationships to multiple tables from a parent table, because if you don't, the original relationship is broken.