You can automatically populate a Combo-box List based upon a Combo-box Table selection.
Using the RAD and code with 3 data files as follows;
File "A" contains apartment buildings, File "B" has units in an apartment building, File "C" has the people applying for a specific apartment in a building.
Using the RAD form for the person's RENTAL APPLICATION you'll need to selection the building shown to the Applicant using a Combo-box table established under CONTENT to show buildings names & addresses. In the Code section "END OF INITIALIZATION" for this form I've used "PROPERTIES" for the combo-box controls;
"This sets the list to the first selection. It is in the 'END OF INITIALIZATION' to only do this once, so if the user clicks on or back-tabs to the control the selection is not automatically changed to the start again."
// all buildings and units loaded into memory, now select first one's and display
"For the same reason stated earlier and in addition this control establishes a filter to only list those units that have the same building key and it sorts the list in ascending order and points to the first one in the list. The same code below is also in the 'ROW SELECTION OF' code so if the user clicks on or back-tabs, the control repeats the same update on the Combo-box List."
// display only units for selected building in ascending order
COMBO_Building_Unit_#..Filter = COMBO_Building_key
COMBO_Building_Unit_#..SortOption = ccRespectNumeric
So if you use the up/down arrow keys or pull-down the list in the form and select different buildings the unit list changes automatically.
Learn more about 'Property' controls using .. to perform data handling.