LPARAMETERS tnInvoiceID, tnSalesPersonID LOCAL lnCommission lnCommission = 0 *-- Load the specified Invoice Record and Salesperson records IF oInvoice.Load( tnInvoiceID ) = FILE_OK AND ; oSalesPerson.Load( tnSalesPersonID ).Load = FILE_OK LOCAL lnCustomerID *-- From the Invoice object, get the customer ID lnCustomerID = oInvoice.GetCustomerID() *-- Load the customer's record IF oCustomer.Load( lnCustomerID ) = FILE_OK *-- Do salespeople get commissions for this customer? IF oCustomer.Commissionable() *-- Load the InvoiceDetail records (items on the invoice) IF oInvoiceDetail.Load( THIS.nInvoiceID ) = FILE_OK LOCAL lnTotal *-- The total salesperson gets a commission on. lnTotal = oInvoiceDetail.GetCommissionableTotal (THIS.nSalesPersonID ) lnCommision = lnTotal * oSalesPerson.GetCommisionRate() ENDIF ENDIF ENDIF ENDIF RETURN lnCommissionI think the key is to keep each entity object focused only on the data in the corresponding table. When you need to use data from more than one table, use and event object.