The database UN.accbd has the single table Nations that contains data for the 193 member countries of the United Nations. The fields for the table are name, continent, population, and area. (Population is given in millions and area in square miles.) Use the United Nations database in the following exercise. Some of the records in the table are shown below:
Using Visual Basic, write a program that displays the names of the continents from the Nations table in a list box. When the user clicks on a continent’s name, the countries in that continent should be displayed in two other list boxes. One list box should display the countries in descending order by their population, and the other should display the countries in descending order by their area. See the figure below for an example.
Suggested Control Names and Attributes:
Name Property | Text Property | Control Type | Notes |
frmUnitedNations | United Nations | Form | Holds Controls |
lstContinents | ListBox | Displays list of continents | |
lstByPop | ListBox | Displays list of countries in order of descending population | |
lstByArea | ListBox | Displays list of countries in order of descending population |