CREATE VIEW (lcViewName) AS ; SELECT subagent.*, agent.agentID, agent.agentnum, agent.name ; FROM pcagent!subagent, pcagent!agent ; WHERE subagent.masterID == ?vpAgentID ; AND subagent.subID == agent.agentID * Set properties for this view DBSETPROP(lcViewName, 'View', 'SendUpdates', .T.) DBSETPROP(lcViewName, 'View', 'Tables', 'SUBAGENT') * Set properties for the fields in the view (for updating the SUBAGENT table) DBSETPROP(lcViewName + '.subagentID', 'Field', 'KeyField', .T.) DBSETPROP(lcViewName + '.subagentID', 'Field', 'Updatable', .T.) DBSETPROP(lcViewName + '.subagentID', 'Field', 'UpdateName', 'SUBAGENT.subagentID') DBSETPROP(lcViewName + '.subagentID', 'Field', 'DataType', "C(15)") DBSETPROP(lcViewName + '.masterID', 'Field', 'KeyField', .F.) DBSETPROP(lcViewName + '.masterID', 'Field', 'Updatable', .T.) DBSETPROP(lcViewName + '.masterID', 'Field', 'UpdateName', 'SUBAGENT.masterID') DBSETPROP(lcViewName + '.masterID', 'Field', 'DataType', "C(15)") DBSETPROP(lcViewName + '.subID', 'Field', 'KeyField', .F.) DBSETPROP(lcViewName + '.subID', 'Field', 'Updatable', .T.) DBSETPROP(lcViewName + '.subID', 'Field', 'UpdateName', 'SUBAGENT.subID') DBSETPROP(lcViewName + '.subID', 'Field', 'DataType', "C(15)") DBSETPROP(lcViewName + '.sdate', 'Field', 'KeyField', .F.) DBSETPROP(lcViewName + '.sdate', 'Field', 'Updatable', .T.) DBSETPROP(lcViewName + '.sdate', 'Field', 'UpdateName', 'SUBAGENT.sdate') DBSETPROP(lcViewName + '.sdate', 'Field', 'DataType', "D") DBSETPROP(lcViewName + '.edate', 'Field', 'KeyField', .F.) DBSETPROP(lcViewName + '.edate', 'Field', 'Updatable', .T.) DBSETPROP(lcViewName + '.edate', 'Field', 'UpdateName', 'SUBAGENT.edate') DBSETPROP(lcViewName + '.edate', 'Field', 'DataType', "D")The SUBAGENT table is the updateable one even though data was also brought in from the parent AGENT table. If a record is added to the SUBAGENT table, you would have to fill in the masterID field (key that points back to parent) with ann appropriate parent key otherwise you would be making an orphan. I don't know how to make the view automatically create a parent, though maybe some DBC triggers could help? Such things usually got complicated enough for me that I end up opening two views, one for parent and one for child and I manually add records where needed...